# plotting phase transformations of a signal

I would like to find the phase variations of the signal with respect to time axes:

S = sin(2*pi*100*t + pi/4) + cos(pi*500*t) + sin(2*pi*100*t + 5*pi/2);

My attempt to get the phase, see figure below: • using fft only frequency content of the sin and cos components are estimated neglecting the phases. I want even the phase information of the components, please help me Feb 6 '20 at 11:46
• This would apply if the equation was of the form of cos(a)+j sin(b). There is no j so there is no phase other than 0 and pi (it is a real signal!) Feb 7 '20 at 4:09
• @jomegaA I want to plot the phase variations along the time series i.e x axes is time and y axes is phase, where as in the above figure the variations are w.r.t frequency. we observe 3 phase changes in the time window between 0 to 0.02 window in time domain and is periodic. Feb 7 '20 at 4:53

This is a real signal, so the phase can only be $$0$$ to $$\pi$$.

• what is actually the angle(fft(S)) giving? Feb 7 '20 at 8:54
• angle(fft(S)) gives the phase variations in the frequency domain but I need phase variations in time domain like for example, in phase-modulated signal I want to detect the phase changes occurring at different time instances. Feb 7 '20 at 9:06
• @Shaheena Please define what you are referring to as "phase variation". In my definition you would need to have a complex signal to have any phase results other than $0$ o $pi$; the arg expression in MATLAB and Octave is consistent with this--it returns the phase versus time and for your signal would be $0$ or $pi$ only. Feb 7 '20 at 12:08