ex070500.m
来自「matlab的一些函数,是初学习者的好资料,」· M 代码 · 共 16 行
M
16 行
% Chapter 7: 例7.5 2-型线性相位FIR滤波器
%
subplot(1,1,1)
h = [-4,1,-1,-2,5,6,6,5,-2,-1,1,-4];
M = length(h); n = 0:M-1;
[Hr,w,b,L] = Hr_Type2(h);
bmax = max(b)+1; bmin = min(b)-1;
subplot(2,2,1); stem(n,h); axis([-1 2*L+1 bmin bmax])
text(2*L+1.5,bmin,'n'); ylabel('h(n)'); title('脉冲响应')
subplot(2,2,3); stem(1:L,b); axis([-1 2*L+1 bmin bmax])
xlabel('n'); ylabel('b(n)'); title('b(n) 系数')
subplot(2,2,2);plot(w/pi,Hr);grid
text(1.05,-20,'频率pi'); ylabel('Hr')
title('2-型振幅响应')
subplot(2,2,4);pzplotz(h,1);
title('零极点分布')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?