How do I hanning window a signal before FFT, inside of for loop?

1 visualizzazione (ultimi 30 giorni)
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 Commento
hosein Javan
hosein Javan il 12 Ago 2020
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?

Accedi per commentare.

Risposte (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov il 12 Ago 2020
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

Categorie

Scopri di più su Fourier Analysis and Filtering in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by