⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sy22.m

📁 数字信号处理工具箱
💻 M
字号:
%Impulse response invariance method
Wp=2*pi*100;Ws=2*pi*300;
Rp=1;Rs=25;fs=1000;T=1/fs;
[n,Wn]=buttord(Wp,Ws,Rp,Rs,'s')
[c,d]=butter(n,Wn,'s');
[b,a]=impinvar(c,d,fs)
[db,mag,pha,grd,w]=freqz_m(b,a);
subplot(2,2,1);plot(w/pi,db);axis([0,1,-50,5]);
subplot(2,2,2);plot(w/pi,pha);
%Bilinear transformation method
Wp1=(2/T)*tan(Wp*T/2);Ws1=(2/T)*tan(Ws*T/2);
[n,Wn]=buttord(Wp1,Ws1,Rp,Rs,'s')
[c,d]=butter(n,Wn,'s');
[b,a]=bilinear(c,d,fs);
[db,mag,pha,grd,w]=freqz_m(b,a);
subplot(2,2,3);plot(w/pi,db);axis([0,1,-50,5]);
subplot(2,2,4);plot(w/pi,pha)

⌨️ 快捷键说明

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