Matlab窗函數法設計FIR低通濾波器 have a -3 dB cutoff frequecy of approx.
題目:
Matlab窗函數法設計FIR低通濾波器 have a -3 dB cutoff frequecy of approx.8429 Hz.
解答:
Fs = 48000; % Sampling Frequency
Fpass = 8429; % Passband Frequency
Fstop = 12000; % Stopband Frequency
Dpass = 0.057501127785; % Passband Ripple
Dstop = 0.0001; % Stopband Attenuation
flag = 'scale'; % Sampling Flag
% Calculate the order from the parameters using KAISERORD.
[N,Wn,BETA,TYPE] = kaiserord([Fpass Fstop]/(Fs/2),[1 0],[Dstop Dpass]);
% Calculate the coefficients using the FIR1 function.
b = fir1(N,Wn,TYPE,kaiser(N+1,BETA),flag);
Hd = dfilt.dffir(b);
添加新評論