Time-domain convolution doesn't match Frequency-domain multiplication in MATLAB
3 views (last 30 days)
Show older comments
I wonder why these two lines of codes generate very different results:
subplot(1,2,1);
semilogx(abs(X.*HPF));
subplot(1,2,2);
semilogx(abs(fft(conv(ifft(X),ifft(HPF),'same'))));
I mean, regardless of the actual values of X and HPF, spectrum derived from multiplying X and HPF should have the same results as the spectrum derived from convoluting their time-domain impulse responses (which is derived by ifft). But my results show that they are quite different. In my case x is the input signal that have a few sine wave components at different frequencies and HPF is a high-pass filter, but the two expressions should always yield the same results right? I'm confused.
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Fourier Analysis and Filtering 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!