program_9_1.m

来自「这是国外一本经典教材附带的程序」· M 代码 · 共 17 行

M
17
字号
% Program 9_1
% Coefficient Quantization Effects on the
% Frequency Response of a Direct Form IIR Filter
%
clf;
[b,a] = ellip(5,0.4,50,0.4);
[h,w] = freqz(b,a,512); g = 20*log10(abs(h));
bq = a2dT(b,5); aq = a2dT(a,5);
[hq,w] = freqz(bq,aq,512); gq = 20*log10(abs(hq));
plot(w/pi,g,'b',w/pi,gq,'r:');grid
axis([0 1 -80 5]);
xlabel('\omega/\pi');ylabel('Gain, dB');
title('original - solid line, quantized - dashed line');
pause
zplane(b,a);
plotzp(bq,aq);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?