# Phase of the sine signal by finding FFT of it in matalb using angle

I am using sine signal with phase=0 an frequency=100KHz. Computed FFT of it.

Using angle function and multiplied the result with 180/pi; But getting 90.36 at 100KHz frequency.

Can anybody explain why I am getting 90 degree instead of 0 degree?

• It goes by definition of the DFT Basically, for each bin of the DFT you correlate your signal with a cosine to get the real part and with a sine to get the imaginary part. Assuming your sine wave has the same frequency as the DFT bin, your sine will be perfectly correlated with the imaginary sine of the DFT while the correlation of your sine wave with the cosine will give 0. Since the output for this frequency bin is imaginary and positive, your will phase will be 90 degrees. en.wikipedia.org/wiki/Discrete_Fourier_transform
– Ben
May 4 at 13:54
• Thanks Ben. Your answer is clear to me. I need to subtract all phase values ? and can you please provide any resource on correlation specifically on DFT things?
– K A
May 4 at 14:49

The basis function for the Fourier Transform is the complex exponential $$e^{j\omega t}$$
Since $$sin(\omega t) = \frac{1}{2j}(e^{j\omega t} - e^{-j\omega t})$$