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