Professional Documents
Culture Documents
Matlab Assignment 01
Matlab Assignment 01
Note that:
FIR filter a=1
Example:
x = impseq(0,-20,120); h1 = filter(b,a,x);
subplot(2,1,2); stem(n,h1);
title('Impulse Response using impseq and filter');
xlabel('n'); ylabel('h(n)')
• Calculate and plot the unit step response
x = stepseq(0,-20,120); s = filter(b,a,x);
subplot(2,1,1); stem(n,s)
title('Step Response'); xlabel('n');
ylabel('s(n)')
• Given x(n) = u(n) – u(n-10), determine the output:
x = stepseq(0,-20,120)-stepseq(10,-20,120);
y = filter(b,a,x);
subplot(2,1,2); stem(n,y)
title('System Response when x(n) = u(n) – u(n-
10)'); xlabel('n'); ylabel('y(n)')
zplane(b,a)
title('z plane');