How to plot spectrogram in Matlab using one-year length data with the sampling rate of 50 Hz?

4 views (last 30 days)
I have one-year length signal with the sampling rate of 50 Hz. The signal is a 1*1576800000 vector, It looks impossible to use spectrogram function to plot spectrogram because normal computer does not have enough storage to calculate and it needs very long time. Does anyone know some other ways to plot spectrogram?
Thank you.
  1 Comment
dpb
dpb on 6 Nov 2016
Well, it would seem a highly unusual process that needed that type of sampling rate over such a time span and even more so that it would be stationary over the period so I'd suggest starting by looking at much smaller pieces and, perhaps if it is then shown the signal is consistent over some period, average to get an estimate over the duration.

Sign in to comment.

Answers (1)

Daniel kiracofe
Daniel kiracofe on 11 Nov 2016
if you don't really need 50 Hz resolution, then use decimate() to make the vector length smaller.
If you really do need 50 Hz resolution, then the only thing to do is to break the signal up into multiple segments, compute the spectrogram for each one individually, and then recombine at the end. This will basically give you the same answer, as spectrogram is splitting the signal up into smaller segments and computing an FFT on each segment anyway. Depending on what window length you want and how much memory you have on your machine, you may need to read part of the data in from the file, compute the spectogram, write that part of the answer out to a file, then read in the next part of the data, etc.

Categories

Find more on Time-Frequency Analysis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!