You are on page 1of 4

DIGITAL SIGNAL PROCESSING LAB

(EC2156)

THOMAS JAMES THOMAS


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

EXPERIMENT 1
Aim:

To plot the exponential signal for different values of a for the given

equation
x(n)=an
(i)
(ii)
(iii)
(iv)

0<a<1
-1<a<0
a>1
a<-1

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.

Tool used: MATLAB R2013b

Program:
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');

Input:
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

Result:

Conclusion: Plotted the exponential signal for different values of a using MATLAB
and obtained the results.

You might also like