Fourier Transform of window functions

6 visualizaciones (últimos 30 días)
Chandi
Chandi el 18 de Nov. de 2022
Comentada: Mathieu NOE el 21 de Nov. de 2022
Hello!
I am trying to figure out how to graph the fourier transform of different window functions but i cant seem to get the correct image like the one i attached for my fft window graph.

Respuesta aceptada

Mathieu NOE
Mathieu NOE el 18 de Nov. de 2022
hello
maybe this can help you
wL = 30; % window length
win1 = hanning(wL);
win1 = win1/sum(win1); % normalize
win2 = triang(wL);
win2 = win2/sum(win2); % normalize
nfft = 256;
S1 = fft(win1,nfft);
S2 = fft(win2,nfft);
f = 1:nfft/2+1;
plot(f,20*log10(abs(S1(1:nfft/2+1))),f,20*log10(abs(S2(1:nfft/2+1))));
ylabel('dB gain')
xlabel('fft bins');
legend('hanning','triangle');
  2 comentarios
Chandi
Chandi el 18 de Nov. de 2022
Thank you that is very helpful! :)
Mathieu NOE
Mathieu NOE el 21 de Nov. de 2022
My pleasure !

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by