afd_elip.m

来自「主要是介绍DSP算法在matlab中的实现」· M 代码 · 共 61 行

M
61
字号
function [b,a] = afd_elip(Wp,Ws,Rp,As);% Analog Lowpass Filter Design: Elliptic% --------------------------------------% [b,a] = afd_elip(Wp,Ws,Rp,As);%  b = Numerator coefficients of Ha(s)%  a = Denominator 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 larger than 0')endif Ws <= Wp        error('Stopband edge must be larger than Passband edge')endif (Rp <= 0) | (As < 0)        error('PB ripple and/or SB attenuation ust be larger than 0')endep = sqrt(10^(Rp/10)-1);A = 10^(As/20);OmegaC = Wp;k = Wp/Ws;k1 = ep/sqrt(A*A-1);capk = ellipke([k.^2 1-k.^2]); % Version 4.0 codecapk1 = ellipke([(k1 .^2) 1-(k1 .^2)]); % Version 4.0 codeN = ceil(capk(1)*capk1(2)/(capk(2)*capk1(1)));fprintf('\n*** Elliptic Filter Order = %2.0f \n',N)[b,a]=u_elipap(N,Rp,As,OmegaC);

⌨️ 快捷键说明

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