写一MATLAB程序设计一个FIR线性相位滤波器对某一低通带限信道建模,期望的幅度响应:A(f)=1 f<3000;=0 f>300

求助
2025-01-07 01:40:56
推荐回答(1个)
回答1:

%滤波前数据
t = 0:0.01:10;
f=5*sin(2*pi*20*t)+5*sin(2*pi*60*t);
%滤波器设计
Fpass = 1; % Passband Frequency
Fstop = 50; % Stopband Frequency
Apass = 1; % Passband Ripple (dB)
Astop = 60; % Stopband Attenuation (dB)
Fs = 2000; % Sampling Frequency
h = fdesign.lowpass('fp,fst,ap,ast', Fpass, Fstop, Apass, Astop, Fs);
Hd = design(h, 'equiripple', ...
'MinOrder', 'any', ...
'StopbandShape', 'flat');
%f2滤波后的数据
f2 = filter(Hd,f);
%对比图
plot(t,f,'b',t,f2,'r');

这是我之前做的一个 希望对你有帮助~