I have a (real) array of data and am trying to analyze its frequency components. I've been using NumPy's FFT routines, but I realized there is something I don't quite understand: why does the output give me an imaginary part?
Of course I know that in general the Fourier transform is complex-valued, but it seems to me that the DFT is sampling frequencies that are integer multiples of the timestep of my original data trace. Shouldn't I then be getting results that lie only on the real axis?
What am I missing here?
fft(cos(2*pi*[0:3]/20)) ans = 3.3479 (0.1910 - 0.3633i) 0.2702 (0.1910 + 0.3633i)
So non integer DFT bin of cos yields complex result... $\endgroup$ – Fat32 Jun 12 '19 at 8:52