Time versus Frequency plot

56 views (last 30 days)
Uspike
Uspike on 6 Aug 2015
Commented: krishneel kumar on 3 Mar 2020
Hello,
I am working on a data obtained from oscilloscope. I transformed time vs intensity to frequency vs intensity plot using FFT function in Matlab. But for some analysis I need to convert same data into Time vs Frequency plot.
Can anyone help me please. I am pretty new to Matlab.
A bit of more explanation is appreciated.
Thank you in advance.
  1 Comment
Adam
Adam on 6 Aug 2015
doc spectrogram
if you have the Signal Processing toolbox

Sign in to comment.

Accepted Answer

Joe
Joe on 6 Aug 2015
There are different ways to do what you want, but in my opinion the simplest is also the best: The "short time FFT." (The Hilbert transform is another common method, but a little more involved). Basically you take an FFT of different sections of the signal, and use that to plot its frequency behavior over time. Here is an overview from an audio perspective, with MATLAB examples.
Like Adam said, 'spectrogram' implements this functionality if you have the SP toolbox. There is an STFT submission on the file exchange which does something similar; it also requires the SP toolbox.
Quick Googling didn't lead me to any implementations which work without the SP toolbox, so you might have to write your own if you don't have it. The algorithm itself isn't too complicated but if you're new to MATLAB that might be tough; I'd recommend you search a little longer for a base implementation if you're missing the toolbox.
  2 Comments
Uspike
Uspike on 6 Aug 2015
Thanks a lot... let me check and get back to you... :-)
krishneel kumar
krishneel kumar on 3 Mar 2020
Hello
I have a data of 700 seconds. I have taken FFT of this data at every 2 seconds. Now, I am not sure how to represent this data in terms of Time Vs Frequency.
Hoping if you could advise on this.
Thank you

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!