MATLAB Answers

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

6 ビュー (過去 30 日間)
Haozhi
Haozhi 2016 年 11 月 6 日
回答済み: Daniel kiracofe 2016 年 11 月 11 日
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 件のコメント
dpb
dpb 2016 年 11 月 6 日
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.

サインインしてコメントする。

回答 (1 件)

Daniel kiracofe
Daniel kiracofe 2016 年 11 月 11 日
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.

Community Treasure Hunt

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

Start Hunting!

Translated by