You are on page 1of 4

clc;

clear all;
close all;
a=[1,0];
b=[1,-0.8];
% finding transfer function
zplane(a,b);
title('Plot of H(z)');
xlabel('Re(h)');
ylabel('Im(h)');
% phase and magnitude
figure;
subplot(2,1,1);
z=1;
for w = 0:0.1:2*pi;
h(z)=1/(1-0.8*exp(-j*w));
z=z+1;
end;
w=0:0.1:2*pi;
plot(w,abs(h));
title('magnitude');
xlabel('w');
ylabel('abs(h)');

subplot(2,1,2);
plot(w,angle(h));
xlabel('w');
ylabel('phase(h)');
title('Phase');

You might also like