Filtering spectrum using FIR filters
23 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Wayne King
on 28 Oct 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')
0 Comments
See Also
Categories
Find more on Statistics and Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!