How do I hanning window a signal before FFT, inside of for loop?
1 回表示 (過去 30 日間)
古いコメントを表示
I am attempting to hanning window a signal extracted from different software. I have been able to sucessfully plot the signal and a FFT of the signal. However, I would also like to use the hanning function to window the signal before I plot the FFT. I reviewed how to do so, but have not encountered examplees similar to mine, in which I am using a for loop. I have attached the code I am running. Any adivce would be greatly appreciated. Thanks.
1 件のコメント
hosein Javan
2020 年 8 月 12 日
Hi. from what I understood from your code, you are trying to shift the window and calculate the fft of the windowed signal. if it is the case, is there any problem you have encountered?
回答 (1 件)
Sulaymon Eshkabilov
2020 年 8 月 12 日
Hi,
You can insert your anticipated hanning window command on line 81 of your script, i.e.,
hold on; WIN_Hann=hann(length(Displacement(:,i))); % Hanning window: line 81
F = fft(Displacement(:,i)'.*WIN_Hann); % Hanning window applied: line 82
Good luck
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!