30t.m
来自「包含50个数字信号处理方面的matlab程序」· M 代码 · 共 12 行
M
12 行
Rp=1;Rs=60;wp1=0.4*pi;ws1=0.5*pi;T=0.001;
wp=(2/T)*tan(wp1/2);ws=(2/T)*tan(ws1/2);
[n,wn]=ellipord(wp,ws,Rp,Rs,'s') ;
[b,a]=ellip(n,Rp,Rs,wn,'low','s') ;
[bz,az]=bilinear(b,a,1/T);
[db,mag,pha,grd,w]=freqz_m(bz,az);
subplot(3,1,1);plot(w/pi,db);
axis([0,1,-100,5]);
xlabel('');ylabel('相对幅度');
title('幅频相应(相对幅度)')
subplot(3,1,3);
plot(w/pi,pha);xlabel('频率(单位:pi)');ylabel('相位');title('相频相应')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?