37t.m

来自「包含50个数字信号处理方面的matlab程序」· M 代码 · 共 14 行

M
14
字号
clc;clear all;
Rp=3;Rs=30;fp1=50;fp2=300;fs1=100;fs2=250;T=0.001;
wp1=2*pi*fp1*T;wp2=2*pi*fp2*T;
wp3=(2/T)*tan(wp1/2);wp4=(2/T)*tan(wp2/2);
wp=[wp3,wp4];
ws1=2*pi*fs1*T;ws2=2*pi*fs2*T;
ws3=(2/T)*tan(ws1/2);ws4=(2/T)*tan(ws2/2);
ws=[ws3,ws4];
[n,wn]=ellipord(wp,ws,Rp,Rs,'s');
[b,a]=ellip(n,Rp,Rs,wn,'stop','s');
[bz,az]=bilinear(b,a,1/T);
[db,mag,pha,grd,w]=freqz_m(bz,az);
plot(w/(pi*2*T),db);axis([0 400 -90 5]);

⌨️ 快捷键说明

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