⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cheby2_3db_hp.m

📁 编写一个函数
💻 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 + -