首页 > 代码库 > 《DSP using MATLAB》示例Example7.22

《DSP using MATLAB》示例Example7.22

技术分享

代码:

h = [1, 2, 3, 4, 3, 2, 1]/15;
M = length(h); n = 0:M-1;
[Hr, w, a, L] = Hr_Type1(h);
a
L

amax = max(a) + 1; amin = min(a) - 1;

figure(‘NumberTitle‘, ‘off‘, ‘Name‘, ‘Exameple 7.22‘)
set(gcf,‘Color‘,‘white‘); 


plot(w/pi, Hr); grid on;
xlabel(‘frequency in \pi units‘); ylabel(‘Hr‘); title(‘Type-1 Amplitude Response‘);

  运行结果:

技术分享

技术分享

    从上图看出,在开区间(0,π)有L-1=2个极值点;误差函数有L+3=6个极值点。

 

《DSP using MATLAB》示例Example7.22