I'm trying to wrap my mind about what happens in Matlab/Octave when you compute the fft of a sine function. Theoretically, the Fourier Transform of a sine is given by two delta functions multiplied by the imaginary unit (one placed at the frequency of the sine and another at minus the frequency). I can see that in the modulus of the FFT (not exactly a delta because of the frequency leakage due to the windowing), but when I check the phase I get a signal that is non-zero over all the support (from 0 to the sampling frequency). I'm playing with this toy example in Octave:
fs = 200,t=-10:(1/fs):10; x = sin(2*pi*30*t); f = linspace(0,1,length(x))*fs; fourierTrans = fft(x); figure,plot(f,abs(fourierTrans)) figure,plot(f,angle(fourierTrans))
And the picture I get for the phase is:
Why is it that I don't see two deltas in the picture for phase of amplitude pi/2 and -pi/2?