How do I hanning window a signal before FFT, inside of for loop?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
hosein Javan
el 12 de Ag. de 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?
Respuestas (1)
Sulaymon Eshkabilov
el 12 de Ag. de 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
0 comentarios
Ver también
Categorías
Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!