in the cartoon below enter image description here

It shows that if we take the inverse Fourier transform of a Hermitian function, real part even and imaginary part is odd we should get a purely real function in the time domain.

I tried to replicate this by taking a frequency response I have, zero padding it making it even for the real and odd in the imaginary. Shown below enter image description here Although my ifft in Matlab I still have a significant imaginary component, the real is shown left and imaginary on the right. enter image description here I also wrote my own script for DFT/IDFT and tested it on a sine function to make sure I get the same as Matlab. Maybe I have missed something?

  • $\begingroup$ Are you using the whole input vector, or are you specifying an fft length when calling fft? Also, a simple one-sample shift will lead to a sinusoidal modulation after dft; make sure you're using the right ,fftshift`ifftshift` $\endgroup$ – Marcus Müller Aug 18 '16 at 11:32
  • $\begingroup$ Maybe it's a numerical/rounding issue? Note that your imaginary part is 1/100th scale of the real part. $\endgroup$ – Atul Ingle Aug 18 '16 at 15:02
  • $\begingroup$ I solved my issue, I had to be very careful in replicating the signal, i wrote it all on paper so i could visually see everything... Should I close the question $\endgroup$ – JS60 Aug 22 '16 at 10:29

A (near) sinusoid in one domain (zoom in off center, and you might see it) can indicate a shift away from symmetry in the other domain. So your initial imaginary signal may be 1 or 1/2 samples off from exact circular symmetry around element 0 (maybe around element 1 in MatLab or Fortran weird array indexing)

  • $\begingroup$ Yeh thanks, I had to be extra careful, I really do not like how matlab index starts from 1 :( $\endgroup$ – JS60 Aug 22 '16 at 10:30

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.