?? ex082400.m
字號:
% Chapter 8: Example 8.24% Elliptic Lowpass Filter Design:% Use of the ELLIP function%% Digital Filter Specifications:wp = 0.2*pi; %digital Passband freq in Hzws = 0.3*pi; %digital Stopband freq in HzRp = 1; %Passband ripple in dBAs = 15; %Stopband attenuation in dB% Analog Prototype Specifications:T = 1; %Set T=1OmegaP = (2/T)*tan(wp/2); %Prewarp Prototype Passband freqOmegaS = (2/T)*tan(ws/2); %Prewarp Prototype Stopband freqep = sqrt(10^(Rp/10)-1); % Passband Ripple parameterRipple = sqrt(1/(1+ep*ep)); % Passband RippleAttn = 1/(10^(As/20)); % Stopband Attenuation% Analog Elliptic Filter order calculations:ep = sqrt(10^(Rp/10)-1); %Passband Ripple FactorA = 10^(As/20); %Stopband Attenuation FactorOmegaC = OmegaP; %Analog Prototype Cutoff freqk = OmegaP/OmegaS; %Analog Prototype Transition Ratio;k1 = ep/sqrt(A*A-1); %Analog Prototype Intermediate cal.capk = ellipke([k.^2 1-k.^2]);capk1 = ellipke([(k1 .^2) 1-(k1 .^2)]);N = ceil(capk(1)*capk1(2)/(capk(2)*capk1(1)));fprintf('\n*** Elliptic Filter Order = %2.0f \n',N)%%*** Elliptic Filter Order = 3 % Digital Elliptic Filter Design:wn = wp/pi; %Digital Passband freq in pi units[b,a]=ellip(N,Rp,As,wn);[b0,B,A] = dir2cas(b,a)%%b0 = 0.1214%%B = 1.0000 -1.4211 1.0000%% 1.0000 1.0000 0%%A = 1.0000 -1.4928 0.8612%% 1.0000 -0.6183 0
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -