wz=0.5*pi;
w0=0.4*pi;
W0=tan(w0/2)
Wz=tan(wz/2)
T=2;
Q=5;
%Analog Transfer Function
B=[1,0,Wz^2];
A=[1,W0/Q,W0^2];
HS=tf(B,A)

[numd,dend]=bilinear(B,A,1/T)
w=[0:pi/1024:pi];
Hs=freqs(B,A,w);
Hz=freqz(numd,dend,w);

subplot(2,1,1);
plot(w/pi,abs(Hs));
xlabel('Omega');
ylabel('Amplitude');
title('Frequency Response of Analog signal');
grid on;

subplot(2,1,2);
plot(w/pi,abs(Hz));
xlabel('Omega');
ylabel('Amplitude');
title('Frequency Response of Digital signal');
grid on;

