Plot spectrogram from time by frequency matrix

조회 수: 13 (최근 30일)
Ana Alonso
Ana Alonso 2019년 2월 7일
답변: João 2019년 2월 7일
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?

채택된 답변

João
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개)

카테고리

Help CenterFile Exchange에서 Time-Frequency Analysis에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by