MATLAB: FFT – Single sided phase

fftphasesingle-sided

Hi there,
I'm familiar with the process of calculating a single-sided magnitude after computing the fft in MATLAB (or any other package).
However, do we have to multiply the phase values by 2 for non-DC fft values? OR, do I simply just keep n/2+1 phase values returned from the raw fft vector?
I've seen examples on MATLAB Answers that show:
  1. just use n/2+1 phase values to represent the final phase response of an fft calculation, and another that shows:
  2. truncate the phase vector to n/2+1 values as per previous, and then doubling all of the of the phase values (except DC value).
Hence my confusion as to which is correct. Would love to know what is the best way to represent the single-sided phase response following the fft process.
Thank you!

Best Answer

It is not necessary (or advisable) to multiply the phase values by 2, particularly because it doesn’t matter. The phase values are the arctangent (actually atan2) of the imaginary divided by the real part of the complex Fourier transform, so the multiplication would be irrelevant. The multiplication by 2 applies to the magnitude values because a one-sided Fourier transform represents only half the energy in the signal. It would be worthwhile to use the unwrap function for the phase angles, however.