Filtering spectrum using FIR filters

7 Ansichten (letzte 30 Tage)
Alex Hoppus
Alex Hoppus am 28 Okt. 2012
If i have signal values x[T] and filter coefficients b[i], i can perform filtering using convolution.
Suppose i have spectrum of x (after FFT) and i need to perform filtering using filters coefficients, how can i perform this? I heard that in frequency domain it will be multiplying, rather than convolution (time domain). But i can't find an equation to use it. I have 614000 values in y = fft(x[T]) vector and 119 filter coefficients (generated using fdatool), i can't multiply them directly ... Thanks.

Antworten (1)

Wayne King
Wayne King am 28 Okt. 2012
You can do the following:
Let B be your vector of FIR coefficients and x your signal. I'll just present an example with a white noise vector and use a 10-point moving average filter.
x = randn(1000,1);
B = 1/10*ones(10,1);
xdft = fft(x);
H = freqz(B,1,length(x),'whole');
Y = xdft.*H;
y = ifft(Y,'symmetric');
Now compare the output y above to
yconv = filter(B,1,x);
plot(y,'b'); hold on;
plot(yconv,'r')

Kategorien

Mehr zu Statistics and Linear Algebra finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by