用MATLAB设计一个滤波频率在0到20HZ范围的滤波器 Z好是FIR的...
Fs = 80; % Sampling Frequency
Fpass = 20; % Passband Frequency
Fstop = 25; % Stopband Frequency
Dpass = 0.057501127785; % Passband Ripple
Dstop = 0.0001; % Stopband Attenuation
dens = 20; % Density Factor
% Calculate the order from the parameters using FIRPMORD.
[N, Fo, Ao, W] = firpmord([Fpass, Fstop]/(Fs/2), [1 0], [Dpass, Dstop]);
% Calculate the coefficients using the FIRPM function.
b = firpm(N, Fo, Ao, W, {dens});
Hd = dfilt.dffir(b);
freqz(Hd.Numerator,1,512);