I have simple smooth time signal with different time period. I would like to transfer period over the time to frequency, and to track frequency changing over the time, I would call it Instantaneous frequency?

PF-period frequency (1/T)... any suggestion?

Time period to frequency

  • $\begingroup$ This is called instantaneous frequency, yes. Is this your question? $\endgroup$
    – Deve
    Dec 19, 2014 at 12:43
  • $\begingroup$ This is how I called it. $\endgroup$
    – ToShare
    Dec 23, 2014 at 9:47

3 Answers 3


You can compute the instantaneous frequency of your data in Matlab as follows:

z = hilbert(x);
N = length(z);
f = angle(z(2:N).*conj(z(1:N-1)))/2/pi;

To get units of Hertz, multiply f by the sample rate.

There are other, similar estimators that do a similar thing. This matlab code can help.

Eric Jacobsen also has a couple of pages here and here.


Thanks to all. John your suggestion I think giving good result, this is what I have been expected.

Original signal sampling frequeny is 102400 Hz and duration is 0.63999 seconds.

I did what Johns suggested in Matlab:

data = x; z = hilbert(x); N = length(z); fs=102400; f = angle(z(2:N).*conj(z(1:N-1)))/2/pi*102400; % to get units in Hz

After post processing I get x-axis- like 63999. How to get x axis in seconds like 0.63999?

  • $\begingroup$ t = [1:length(f)]/102400;plot(t,f);xlabel('Seconds'); $\endgroup$
    – John
    Dec 23, 2014 at 12:11

I think you want to create some sort of spectrogram. The only difference is that the spectrogram contains a full frequency spectrum for every time period, and you want to get just the dominant frequency, but you can run a dominant frequency search (maximum search), and you will get what you want. You have control both of the time and frequency resolution.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.