필터 지우기
필터 지우기

spectrogram plotting of Amplitude frequency vs. frame

조회 수: 9 (최근 30일)
Mona
Mona 2014년 12월 14일
댓글: Star Strider 2014년 12월 15일
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