?? ellip_3db_lp.m
字號:
function [b,a] = ellip_3db_lp(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)% 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)fvtool(b,a);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -