Using the following matlab commands, phase of analytic signal can be obtained.
sig_a = hilbert ( sig ) ; ph = atan(angle(sig_a)) ;
As for as my understanding is angle(sig_a) will give phase of sig_a. I am not understanding why tan inverse of angle(sig_a) is required? Please help.
As stated in comments, applying
atanafteranglemakes no sense, since theanglecommand outputs the phase in radians. It would be appropriate to have eitherph = angle(sig_a);ph = unwrap(angle(sig_a));Unwrap is a useful command that eliminates unnecessary breaks in the phase plot by picking a continuous branch of argument.