exa020803_freqz.m
来自「数字信号处理的一些MATLAB源程序」· M 代码 · 共 20 行
M
20 行
%-----------------------------------------------------------------
% exa020803_freqz.m, for example 2.8.3
% to test freqz.m and to obtain the frequency response.
%-----------------------------------------------------------------
clear all;
b=[.001836,.007344,.011016,.007374,.001836];
a=[1,-3.0544,3.8291,-2.2925,.55075];
[H,w]=freqz(b,a,256,1);
Hr=abs(H);
Hphase=angle(H);
Hphase=unwrap(Hphase); % 解卷绕
subplot(211)
plot(w,Hr);grid on;
ylabel(' Amplitude Freq. Res.')
subplot(212)
plot(w,Hphase);grid on;
ylabel(' Phase Freq. Res.')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?