fft moving window problem
조회 수: 6 (최근 30일)
이전 댓글 표시
I'd like to perform moving window fft on my signal. I'd like to use hamming window first, and then try hanning. I started writing the code, however I dont know how to save and merge data from each fft in the loop. I'll be very grateful to any suggestions. The code is:
x = sig; % my signal
nx = length(x); % size of signal
w = hamming(32); % hamming window
nw = length(w); % size of window
pos=1;
while (pos+nw <= nx) % while enough signal left
y = x(pos:pos+nw-1).*w; % make window y
%%%%process window y %%%%
yy = fft(y,32);
pos = pos + nw/2; % next window
end
thanks in advance, KK
댓글 수: 0
답변 (2개)
Daniel Shub
2012년 8월 7일
You should have a look at SPECTROGRAM.
댓글 수: 1
Pengxiang Huang
2020년 6월 12일
spectrogram doe not fit for his purpose totally, you may miss a lot of consideration such as computation burden.
Katarzyna
2012년 8월 8일
댓글 수: 2
Daniel Shub
2012년 8월 8일
This should be a comment on my answer, and not a new answer. Have you read the documentation of SPECTROGRAM. This is exactly what the function does.
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!