How is it possible?

I was thinking of taking just the real part of the DFT of my signal (isn't that zeroing out phases?) with


but the magnitudes of that result don't match :

abs(real(fft(X))) != abs(fft(X))

Thanks in advance.

  • $\begingroup$ The magnitude is the sqrt(rere + imim). If the phase isn't zero to start with, the real part will be different from the magnitude, so, of course, they won't match. $\endgroup$
    – hotpaw2
    Jun 27, 2015 at 18:02
  • $\begingroup$ you are right hotpaw2, come to think of it I'll remove the question since it's a naive one $\endgroup$ Jun 27, 2015 at 18:12

1 Answer 1


it is obvious that abs(real(fft(x)))!=abs(fft(x)) since you are removing the imaginary part while taking the real function.One way if you want a signal with all dft components being real.Is to normal to just take abs(fft(x)) as the spectrum itself rather than taking the real components.In this you maintain the magnitude and all the components have zero phase.I hope this answers your question

  • $\begingroup$ thank you Vinith that was it, right before my eyes but couldn't see it :) $\endgroup$ Jun 27, 2015 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.