Professional Documents
Culture Documents
Clc
Close all
T = 0 :20 ;
Stem ( t, t, ‘b”) ;
Title (‘Discrete plot of r(n)’)
Xlabel(“time’)
Ylabel(“Amplitude”)
Xlim([0 20 ])
Ylim([0 20 ])
Result :
EXPERIMENT 2 ( C )
CODE :
Clc
Close all
N = -3 : 1 : 4 ;
X = [ -1 -1 -1 1 1 0 0 ] ;
Stem(n , x) ;
Title ( ‘ Discrete plot of x(n) ‘)
Xlabel(“n”)
Ylabel(“Amplitude “)
Xlim([ -4 5 ])
Ylim([ -2 2 ])
Result :
EXPERIMENT 2 (D)
CODE :
Clc
Close all
N = -2 : 1 : 6 ;
X=[000123300];
Stem(n ,x ) ;
Title (‘Discrete plot of x(n)’)
Xlabel ( “n” )
Ylable (“Amplitude “)
Xlim( [-3 7 ] )
Ylim( [ 0 4 ] )
Result :
EXPERIMENT 2 ( E )
CODE :
Clc
Close all
N = -3 : 1 : 4 ;
X = [ 0 -2 -2 2 2 0 2 0 ]
Stem (n, x ) ;
Title (‘Discrete plot of x(n) ‘)
Xlabel(“n”)
Ylabel(“Amplitude”)
Xlim([-4 4])
Ylim([-3 3])
Result :
Conclusion :
Hence we perform the generation of discrete time signal using stem function with code ( A B
CDE)