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

📄 ellip3db.m

📁 IEEE文章仿真FIR滤波器,附带源代码程序,便于理解与深入学习.
💻 M
字号:
function [b,a] = ellip3db(N,Fc,Apass,Astop)% ELLIP3DB Design a lowpass elliptic filter for a given 3 dB point.%   Inputs:%       N     - Filter order%       Fc    - 3 dB cutoff frequency (0 to 1)%       Apass - Passband attenuation (dB)%       Astop - Stopband attenuation (dB)%%   NOTE 1: This function requires the Filter Design 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] = ellip3db(6,.3,1,80);%   fvtool(b,a)%   Author(s): R. Losada, V. Pellissier%   Copyright 2005 The MathWorks, Inc.% Design an elliptic filter for any fpfp = Fc; % To keep things simple, we make fp equal to Fc% Design prototype filter[btemp,atemp] = ellip(N,Apass,Astop,fp);% Find 3 db point[H,w]=freqz(btemp,atemp,1024);indx = max(find(abs(H).^2 >.5));% Refine search [H2,w2]=freqz(btemp,atemp,linspace(w(indx),w(indx+1),1000)');indx2 = max(find(abs(H2).^2 >.5));f3db = w2(indx2)/pi;% Apply frequency transformation to obtain final filter[b,a] = iirlp2lp(btemp,atemp,f3db,Fc);

⌨️ 快捷键说明

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