Filtering spectrum using FIR filters

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.

Answers (1)

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')

Categories

Asked:

on 28 Oct 2012

Community Treasure Hunt

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

Start Hunting!