📄 cheby1_3db_hp.m
字号:
function [b,a] = cheby1_3db_hp(N,wc,wp)
% N is the order
% wc is the 3dB cutoff frequency of the highpass filter we need
% wp is the passband-edge frequency of the highpass fiter we need
% wclp is the 3dB cutoff frequency of the original lowpass filter
% wplp is the passband-edge frequency of the original lowpass filter
% choose any walue of wclp,here we set 0.2
wclp=0.2
% alfa is one parameter of the Constantinides transfomation
alfa=-(cos((wclp+wc)*pi/2))/(cos((wclp-wc)*pi/2));
wplp=angle(-(exp(-j*wp*pi)+alfa)/(1+alfa*exp(-j*wp*pi)))/pi;
OmegaC = tan(pi*wclp/2);
OmegaP= tan(pi*wplp/2);
% find out the value of Ap
est=1/cosh(N*acosh(OmegaC/OmegaP));
Ap=10*log10(est^2+1)
% use classic methods to design our highpass filter
[b,a] = cheby1(N,Ap,wp,'high')
fvtool(b,a);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -