Plot spectrogram from time by frequency matrix
33 次查看(过去 30 天)
显示 更早的评论
I'm trying to plot a spectrogram. I have a matrix where the columns represent 30 ms windows and the rows represent frequencies. So each entry in the matrix should map to an intensity value at time (column) at frequency (row). I've not plotted such high-dimensional data before, what should I use?
0 个评论
采纳的回答
João
2019-2-7
Try this,
[s, f, t] = spectrogram(x, w ,noverlap, nfft, Fs);
% x is the signal; %w is the window;
% noverlap is the windowing overlap; nfft is the size of fft;
% and Fs is the samplong rate.
figure()
surf(t, f, 20*log10(abs(s)));
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time-Frequency Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!