Here's some Matlab code: % Assume 'x' is the input time-domain sequence and 'y' is it's Hilbert transform. Analytic_Signal = hilbert(x); y = imag(Analytic_Signal); Instantaneous_Magnitude = abs(Analytic_Signal); Instantaneous_Phase = unwrap(atan2(y, x)); Instantaneous_Freq = diff(Instantaneous_Phase);