spectrogram plotting of Amplitude frequency vs. frame

3 次查看(过去 30 天)
Hi,
I used spectrogram matlab function in order to obtain a STFT as follows:
nfft=1024;
noverlap=nfft/2;
wnd= hamming(nfft,'periodic');
[Y, F, T, P] = spectrogram (y, wnd, noverlap, nfft, fs);
Now, I am trying to plot a 3D plot of frequency , amplitude for each frame I have. can anyone help please.
Thanks in advance

采纳的回答

Star Strider
Star Strider 2014-12-14
From the documentation for spectrogram:
spectrogram(...) plots the PSD estimate for each segment on a surface in a figure window. The plot is created using
surf(T,F,10*log10(abs(P)));
axis tight;
view(0,90);
So to get your 3D plot, simply comment out (or remove) the view(0,90) call, or change it to a different azimuth and elevation.
  6 个评论
Mona
Mona 2014-12-14
Great!!!!! mesh worked much better than surf.... Thanks alot
Star Strider
Star Strider 2014-12-15
My pleasure!
I use mesh frequently when surf is too dense.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Time-Frequency Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by