www.pudn.com > MATLAB.rar > exa020502.m


>-------------------------------------------------------------------------
> exa020502.m, for example 2.5.2 and fig 2.5.6,
>-------------------------------------------------------------------------
clear all;

> 求如下三个系统的幅频响应;
b1=[1/2,1/2];
b2=[1/2,-1/2];
b3=[1 0 1];
b3=b3/2;

[H1,P]=freqz(b1);
subplot(331);plot(P/2/pi,abs(H1));grid on;
[H2,P]=freqz(b2);
subplot(332);plot(P/2/pi,abs(H2));grid on;
[H3,P]=freqz(b3);
subplot(333);plot(P/2/pi,abs(H3));grid on;