squared fast Fourier transform of a moving boxcar filter
조회 수: 6 (최근 30일)
이전 댓글 표시
I need to calculate time evolving PSD or Squared fft of a signal at certain frequency using a moving boxcar filter. I need to show the variations of signal at certain frequencies over time.
댓글 수: 0
답변 (1개)
Wayne King
2013년 3월 15일
Just specify the boxcar filter as the window argument in spectrogram.
t=0:0.001:2;
x=chirp(t,0,1,150);
win = 1/200*ones(200,1);
% if you want unit norm in your filter
win1 = 1/sqrt(200)*ones(200,1);
[y,f,t,p] = spectrogram(x,win,100,length(win),1E3);
The matrix, p, contains the short-time PSD estimates for a length 200 with a 100 sample overlap in the above example. Tailor it as appropriate for your case.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!