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

📄 lp_cheby_digital.m

📁 经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助
💻 M
字号:
% Name:lp_cheby_digital
%====================================================================
% This program is used to 
% design a type 1 chebyshev lowpass digital filter
% The specifications are:
% wp:The passband cutoff frequency in radians/second
% ws:The stopband cutoff frequency in radians/second
% ap:The passband attenuation in dB
% as:The stopband attenuation in dB
%=====================================================================
% The specifications
wp=0.2*pi;
ws=0.3*pi;
ap=1;
as=15;
%=====================================================================
% Design the digital filter and plot the frequency response curves
[N,wn]=cheb1ord(wp/pi,ws/pi,ap,as);
[b,a]=cheby1(N,ap,wn);
[H,w]=freqz(b,a);
subplot(211)
plot(w/pi,abs(H));axis([0,1,0,1.1])
grid on,title('The magnitude response of digital lowpass filter')
ylabel('Magnitude')
subplot(212)
plot(w/pi,20*log(abs(H)))
grid on
axis([0,1,-60,0])
ylabel('Magnitude in dB')
xlabel('Frequency (pi)')
[k,bi,ai]=dir2par(b,a);
%=================================================================

⌨️ 快捷键说明

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