program_9_3.m
来自「数字信号处理的matlab原代码」· M 代码 · 共 14 行
M
14 行
% Program 9_3
% Design of IIR Butterworth Bandpass Filter
%
Wp = input('Passband edge frequencies = ');
Ws = input('Stopband edge frequencies = ');
Rp = input('Passband ripple in dB = ');
Rs = input('Minimum stopband attenuation = ');
[N,Wn] = buttord(Wp, Ws, Rp, Rs);
[b,a] = butter(N,Wn);
[h,omega] = freqz(b,a,256);
gain = 20*log10(abs(h));
plot (omega/pi,gain);grid;
xlabel('\omega/\pi'); ylabel('Gain, dB');
title('IIR Butterworth Bandpass Filter');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?