?? cheby2_3db_hp.m
字號:
function [b,a] = cheby2_3db_hp(N,wc,ws)
% N is the order
% wc is the 3dB cutoff frequency of the highpass filter we need
% ws is the stopband-edge frequency of the highpass fiter we need
% wclp is the 3dB cutoff frequency of the original lowpass filter
% wslp is the stopband-edge frequency of the original lowpass filter
% choose any walue of wclp
wclp=0.2
alfa=-(cos((wclp+wc)*pi/2))/(cos((wclp-wc)*pi/2));
wslp=angle(-(exp(-j*ws*pi)+alfa)/(1+alfa*exp(-j*ws*pi)))/pi;
% find the anolog 3dB cutoff frequency
OmegaC = tan(pi*wclp/2);
OmegaS = tan(pi*wslp/2);
% find out the walue of Ast
est=cosh(N*acosh(OmegaS/OmegaC));
Ast=10*log10(1+est^2);
% use classic method to design filter
[b,a] = cheby2(N,Ast,ws,'high')
fvtool(b,a);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -