I understand that the magnitude and phase are captured in the real and imaginary parts in the result of an fft. But how does each sample capture phase?
Is the phase related to the N discrete samples provided in time domain?
That is, if the input sample included 44100 samples for a second, then is each resulting value of the FFT represent 1/44100 of the phase?
For example, the first FFT value is at frequency 1/44100 and the second value is 2/44100 and so on?
The output of an FFT simply expresses how you can reconstruct the original waveform from the sum of harmonically-related sinusoidal components.
Each output value expresses the amplitude and phase (i.e. offset angle) of the corresponding component. It's important to note that each component is a complex sinusoid (something of the form A * exp(j * 2pi * f * n + phi)
, not A * cos(2pi * f * n + phi)
).
The frequency is implicit in the index of the output sample; if your sample rate if fs
(in Hz) and you have a length-N
FFT, then the centre frequency corresponding to output sample i
is i*fs/N
(in Hz).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With