cheby2_3db_lp.m

来自「编写一个函数」· M 代码 · 共 21 行

M
21
字号
function [b,a] = cheby2_3db_lp(N,Fc,Ast)
% CHEBY2_3DB Design a lowpass Chebyshev Type II filter given a 3 dB point.
%   Inputs:
%       N   - Filter order
%       Fc  - 3 dB cutoff frequency (0 to 1)
%       Ast - Stopband attenuation (dB)

% Compute cutoff frequency of analog lowpass filter
Wc = tan(pi*Fc/2); 

% Find corresponding analog stopband-edge frequency
est = sqrt(10^(Ast/10)-1);
Wst = Wc*cosh(1/N*acosh(est));

% Convert analog stopband-edge frequency to digital
Fst = 2*atan(Wst)/pi;

% Use classic design technique
[b,a] = cheby2(N,Ast,Fst)
fvtool(b,a);

⌨️ 快捷键说明

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