High quality spectrogram with a few seconds signal

7 次查看(过去 30 天)
I am trying to get a high quality spectrogram with a signal that is only 5 seconds long. This is the line I am using: the sampling frequency is 1000Hz.
spectrogram(signal,128,64,2048,fs,'yaxis')
I do not get the quality I need. Is there something I could do?

回答(1 个)

Rick Rosson
Rick Rosson 2016-2-7
编辑:Rick Rosson 2016-2-8
Please try the following:
% Window duration (in seconds):
dur = 0.5;
% Spectrogram settings (in samples):
winSize = round(fs*dur);
overlap = round(winSize/2);
fftSize = winSize;
% Plot the spectrogram:
spectrogram(signal,winSize,overlap,fftSize,fs,'yaxis');
Then try experimenting with the value of dur until the spectrogram provides a good balance between time resolution and frequency resolution.
  2 个评论
Diana
Diana 2016-2-8
Hello Rick,
Thank you for your answer, I tried it, but I still don't get the results I need.
Diana
Rick Rosson
Rick Rosson 2016-2-8
What values did you try for dur? What are you trying to do?

请先登录,再进行评论。

类别

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