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

📄 elliptic_an.m

📁 经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助
💻 M
字号:
% Name: ellip_design_an
% This program is used to design the elliptic lowpass filter
% The specifications of the filter are:
% Rp: The maximal passband attenuation in dB
% Rs: The minimum stopband attenuation in dB
% wp: The passband cutoff frequency 
% ws: The stopband cutoff frequency
% N:  The order of the lowpass filter
clear,close all,
format short
Rp=0.3;%input('Type in the data ap=:');
Rs=25;%input('Type in the data as=:');
Wp=500*2*pi;
Ws=600*2*pi;
%==========================================================================

%===========================================================================
wn=Wp/(2*pi);

[N, Wn] = ELLIPORD(Wp, Ws, Rp, Rs, 's')
N
[z,p,k] = ELLIPAP(N,Rp,Rs);

[b,a]=zp2tf(z,p,k);

%==========================================================================
ba=b;aa=a;
for m=1:N;
    aa(m+1)=a(m+1)*Wp^(m);
    ba(m+1)=b(m+1)*Wp^(m);
end
ba;
aa;
%==========================================================================
[h,w]=freqs(ba,aa);
subplot(211)
plot(w/(2*pi),abs(h))
axis([0,2000,0,1.2])
grid on,title('The frequency response of 5-th order Elliptic lowpass filter')
xlabel('Frequency f in Hz')

subplot(223)
impulse(ba,aa)

subplot(224)
step(ba,aa)

⌨️ 快捷键说明

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