0% found this document useful (0 votes)
16 views4 pages

Digital Signal Processing Lab

This document describes a MATLAB program that plots exponential signals for different values of the parameter a. The program generates exponentially decaying, growing, and alternating signals as predicted by the theory. It takes user input for the a values and plots the corresponding signals as separate subplots to show the effects of varying a. The results match the expected behavior and confirm the generation of exponential signals for different ranges of a values using MATLAB.

Uploaded by

Thomas James
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views4 pages

Digital Signal Processing Lab

This document describes a MATLAB program that plots exponential signals for different values of the parameter a. The program generates exponentially decaying, growing, and alternating signals as predicted by the theory. It takes user input for the a values and plots the corresponding signals as separate subplots to show the effects of varying a. The results match the expected behavior and confirm the generation of exponential signals for different ranges of a values using MATLAB.

Uploaded by

Thomas James
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

DIGITAL SIGNAL PROCESSING LAB

(EC2156)

THOMAS JAMES THOMAS


REG NO: 2014EL22
M.Tech (Digital Systems)

PROGRAM 1

Object: To plot the exponential signal for different values of a for the given equation
x(n)=an
(i)

0<a<1

(ii)

-1<a<0

(iii)

a>1

(iv)

a<-1

Tool used: MATLAB R2010b


Theory: A real discrete-time exponential function is given by
g(n)= an , n>=0
0

, n<0

For the different values of a taken, exponentially decaying or growing functions will be
obtained. When 0<a<1, an exponentially decaying sequence will be obtained. When -1<a<0, an
exponentially decaying sequence with alternate positive and negative amplitude samples will be
obtained. When a>1, an exponentially growing sequence will be obtained. When a<-1, an
exponentially growing sequence with alternate positive and negative amplitude samples will be
obtained.

Source Code:
clc;
clear all;
close all;
n=0:20;
a1=input('Enter the value of a in 0<a<1 : ');
x=a1.^n;
a2=input('Enter the value of a in -1<a<0 : ');
y=a2.^n;
a3=input('Enter the value of a>1 : ');

z=a3.^n;
a4=input('Enter the value of a<-1 : ');
u=a4.^n;
subplot(2,2,1);
stem(n,x);
xlabel('Time index n');
ylabel('Amplitude');
title('Exponential signal for 0<a<1');
subplot(2,2,2);
stem(n,y);
xlabel('Time index n');
ylabel('Amplitude');
title('Exponential signal for -1<a<0');
subplot(2,2,3);
stem(n,z);
xlabel('Time index n');
ylabel('Amplitude');
title('Exponential signal for a>1');
subplot(2,2,4);
stem(n,u);
xlabel('Time index n');
ylabel('Amplitude');
title('Exponential signal for a<-1');

Result:
Enter the value of a in 0<a<1 : 0.5
Enter the value of a in -1<a<0 : -0.5
Enter the value of a>1 : 5
Enter the value of a<-1 : -5

Conclusion: Implemented the generation of the exponential signal for different values of a using
MATLAB and plotted the same. It is observed that for 0<a<1, an exponentially decaying sequence is
obtained, for -1<a<0, an exponentially decaying sequence with alternate positive and negative
amplitude samples is obtained, for a>1,an exponentially growing sequence is obtained, for a<-1, an
exponentially growing sequence with alternate positive and negative amplitude samples is obtained.

You might also like