필터 지우기
필터 지우기

Time vector returned by spectrogram

조회 수: 2 (최근 30일)
Warren Koontz
Warren Koontz 2015년 9월 27일
답변: Greg Dionne 2015년 10월 23일
I have tried using as follows:
[s,f,t] = spectrogram(x,window,noverlap,fs);
The values returned in t seem to have no relation to real time (in seconds), sample count or anything that I can imagine. My workaround is to replace t with a linear scale of the same length ranging from 0 to length(x)/fs. Can someone explain the way spectrogram determines t?

답변 (1개)

Greg Dionne
Greg Dionne 2015년 10월 23일
The time instants are roughly those in the center of each window used for the spectrum. The time between estimates is the difference between the length of the window and the overlap.
For example if you have N samples and a window of length L with an overlap of K, then the estimated time for the first window of L samples is (L/2)/Fs, the next is (L/2+(L-K))/Fs, the next is (L/2+2*(L-K))/Fs, etc., up to the last possible window of samples.

카테고리

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