.freqz功能:用于求解离散时间系统的频率响应函数H(ej)。例3-1 已知离散时间系统的系统函数为b=0.1321,0,-0.3963,0,0.3963,0,-0.1321;a =1,0,0.34319,0,0.60439,0,0.20407;freqz(b,a);例3-2 已知离散时间系统的系统函数,求该系统在0频率范围内归一化的绝对幅度频率响应与相位频率响应。解 MATLAB 程序如下:b0.2,0.1,0.3,0.1,0.2;a1,1.1,1.5,0.7,0.3;w(0:499)*pi/500; %在pi 的范围内取500 个采样点hfreqz(b,a,w); %求系统的频率响应subplot(2,1,1),plot(w/pi,abs(h);grid %作系统的幅度频响图axis(0,1,1.1*min(abs(h),1.1*max(abs(h);ylabel(幅度);subplot(2,1,2),plot(w/pi,angle(h);grid