iir.m

来自「基于matlab的数字信号处理经典实验代码及所有完整实验报告」· M 代码 · 共 26 行

M
26
字号
wp=0.2*pi;Rp=1;ws=0.3*pi;As=15;
[n,wn]=buttord(wp,ws,Rp,As,'s')
[z,p,k]=buttap(n);
[bap,aap]=zp2tf(z,p,k)
[b,a]=lp2lp(bap,aap,wn);
[db,mag,pha,w]=freqs_m(b,a,0.5*pi);
[ha,x,t]=impulse(b,a);
figure(1);
subplot(2,2,1),plot(w/pi,mag);title('幅度');
subplot(2,2,2),plot(w/pi,db);title('幅度 in db');
subplot(2,2,3),plot(w/pi,pha/pi);title('相位');
subplot(2,2,4),plot(t,ha),title('冲击响应');
figure(2)
freqs(b,a);











⌨️ 快捷键说明

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