I need some explanations, how to understand phase spectrum of different functions, and what does phase spectrum means I'm trying to plot phase spectrum of sine in Matlab. Here is a code:
f(t)=sin(t);
S(w) = fourier(f(t), t, w);
w_values = 0:1:5;
F = double(subs(S, w, w_values));
figure, plot(w_values, angle(F)), title('Phase plot'), xlabel('Frequency'), ylabel('Phase');
Here is an image of plot:
Can you explain why is that? Why at frequency = 1 (Hz of what?) Phase = -pi/2? Why only at frequency = 1? How to understand it? And why cosine wave has no phase shifts at any frequency? Also after plotting sin(t)/t I got this:
As you can see, with frequency = 2 and more, phase something about between [-2;-1] The same question: Why is that?