滤波器的使用
弱弱的问一下,如果说作了一个滤波器,怎么用它来滤波呢?比如说,用matlab自己带的一个例子,生成了一个滤波器,但是,我怎么用它来对信号x进行滤波?
高人指点一下!
rp = 3; % Passband ripple
rs = 40; % Stopband ripple
fs = 2000; % Sampling frequency
f = ; % Cutoff frequencies
a = ; % Desired amplitudes
% Compute deviations
dev = [(10^(rp/20)-1)/(10^(rp/20)+1)10^(-rs/20)];
= firpmord(f,a,dev,fs);
b = firpm(n,fo,ao,w);
freqz(b,1,1024,fs);
title('Lowpass Filter Designed to Specifications'); 已知滤波器系数b,可用filter函数对信号进行滤波,例如:
y=filter(b,1,x);
页:
[1]