Sunteți pe pagina 1din 3

LAB TASK:

Q:01
a) x(n) = 2 * 2n + 4(1 / 2)n Z –inverse:
Z –transform: syms z n
syms z n x(n) = ((z*sin(1))/(z^2 - 2*cos(1)*z + 1) +
x(n) = (2 * (2^n) + (4*(1 / 2)^n)) (z*(z - cos(1)))/(z^2 - 2*cos(1)*z + 1))
ztrans (2 * (2^n) + (4*(1 / 2)^n)) iztrans ((z*sin(1))/(z^2 - 2*cos(1)*z + 1) +
ans = (z*(z - cos(1)))/(z^2 - 2*cos(1)*z + 1))

(2*z)/(z - 2) + (4*z)/(z - 1/2) ans =


Z –inverse: sin(n) + cos(n)
syms z n
x(n) = ((2*z)/(z - 2) + (4*z)/(z - 1/2)) d) x(n)= (1/2)n + 2n + n2
iztrans ((2*z)/(z - 2) + (4*z)/(z - 1/2)) Z – transform:
ans = syms z n
x(n) = (((1/2)^n) + (2*n) + (n^2) )
2*2^n + 4*(1/2)^n ztrans (((1/2)^n) + (2*n) + (n^2) )
ans =
b) x(n) = 4^-n
Z –transform: (2*z)/(z - 1)^2 + z/(z - 1/2) + (z*(z + 1))/(z -
syms z n 1)^3
x(n) = (4^-n) Z –inverse:
ztrans (4^-n) syms z n
ans = x(n) = ((2*z)/(z - 1)^2 + z/(z - 1/2) + (z*(z
+ 1))/((z - 1)^3))
z/(z - 1/4) iztrans ((2*z)/(z - 1)^2 + z/(z - 1/2) + (z*(z +
1))/((z - 1)^3))
Z –inverse: ans =
syms z n ((1/2)^n) + (2*n) + (n^2)
x(n) = (z/(z - 1/4))
iztrans (z/(z - 1/4)) Q:02
ans =
a)
(1/4)^n
n= [1 2 1];
c) x(n)=Sin(n) + cos(n) d= [1 -2 4];
Z –transform: roots (d)
syms z n roots (n)
x(n) = (sin(n) + cos(n)) zplane(n,d)
ztrans (sin(n) + cos(n)) figure
ans = pzmap(n,d)
ans =
(z*sin(1))/(z^2 - 2*cos(1)*z + 1) + (z*(z -
cos(1)))/(z^2 - 2*cos(1)*z + 1) -1
-1
Q:03
a) sin (4*pi*60*t)
t = ([0:0.05:0.5]);
x = sin (4*pi*60*t) ;
X = fft(x);
subplot(311)
stem(t,abs(X))
title('DFT magnitude')
subplot(312)
stem(t,angle(X))
title('DFT phase')
b) y=ifft(X);
n= [0 1 1/2]; subplot(313)
d= [1 -3/5 2/25]; stem(t,y)
roots (d) title('iDFT')
roots (n)
zplane(n,d)
figure
pzmap(n,d)
ans =

-0.5000

b) cos (2*pi*90*t)
t = ([0:0.05:0.5]);
x = cos (2*pi*90*t) ;
X = fft(x);
subplot(311)
stem(t,abs(X))
title('DFT magnitude')
subplot(312)
stem(t,angle(X))
title('DFT phase')
y=ifft(X);
subplot(313)
stem(t,y)
title('iDFT')

c) sin (2*pi*15*t) + sin(2*pi*40*t)


t = ([0:0.05:0.5]);
x = sin (2*pi*15*t) + sin(2*pi*40*t) ;
X = fft(x);
subplot(311)
stem(t,abs(X))
title('DFT magnitude')
subplot(312)
stem(t,angle(X))
title('DFT phase')
y=ifft(X);
subplot(313)
stem(t,y)
title('iDFT')

S-ar putea să vă placă și