afd_butt.m
来自「很多matlab的源代码」· M 代码 · 共 20 行
M
20 行
function [b,a] = afd_butt(Wp,Ws,Rp,As)
% Analog Lowpass Filter Design:Butterworth
% -------------------------------------------
% [b,a] = afd_butt(Wp,Ws,Rp,As);
% b = Numerator coefficients of Ha(s)
% a = Denomintor coefficients of Ha(s)
% Wp = Passband edge frequency in rad/sec;Wp>0
% Ws = Stopband edge frequency in rad/sec;Ws>Wp>0
% Rp = Passband ripple in +dB:(Rp>0)
% As = stopband attenuation in +dB;(As>0)
if Wp <= 0
error('Passband edge must be large than 0')
end
if Ws <= Wp
error('Stopband edge must be larger than Passband edge')
end
N = ceil((log10((10^(Rp/10)-1)/(10^(As/10)-1)))/(2*log10(Wp/Ws)));
fprintf('\n*** Butterworth Filter Order = %2.of\n',N)
Omegac = Wp/((10^(Rp/10)-1)^(1/(2*N)));
[b,a] = u_buttap(N,Omegac);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?