cheby1_3db.m
来自「IEEE文章仿真FIR滤波器,附带源代码程序,便于理解与深入学习.」· M 代码 · 共 33 行
M
33 行
function [b,a] = cheby1_3db(N,Fc,Ap)
% CHEBY1_3DB Design a lowpass Chebyshev Type I filter given a 3 dB point.
% Inputs:
% N - Filter order
% Fc - 3 dB cutoff frequency (0 to 1)
% Ap - Passband attenuation (dB)
%
% NOTE 1: This function requires the Signal Processing Toolbox.
%
% NOTE 2: To design highpass, bandpass, and bandstop filters use the
% resulting filter from this function along with IIRLP2HP, IIRLP2BP, and
% IIRLP2BS respectively. These functions are included in the Filter
% Design Toolbox.
%
% % Example 6th order filter with cutoff at 0.3:
% [b,a] = cheby1_3db(6,.3,1);
% fvtool(b,a)
% Author(s): V. Pellissier, R. Losada
% Copyright 2005 The MathWorks, Inc.
% Compute cutoff frequency of analog lowpass filter
Wc = tan(pi*Fc/2);
% Find corresponding analog passband-edge frequency
Wp = Wc/cosh(1/N*acosh(1/sqrt(10^(Ap/10)-1)));
% Convert analog passband-edge frequency to digital
Fp = 2*atan(Wp)/pi;
% Use classic design technique
[b,a] = cheby1(N,Ap,Fp);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?