How does the FFT zero pad

9 visualizaciones (últimos 30 días)
Avelino Amado
Avelino Amado el 23 de Mayo de 2019
Comentada: Matt J el 23 de Mayo de 2019
I am using the Hilbert function for an analysis, and I would like to use the FFT method to get the imaginary part. What I am unsure of is how the FFT function is zero padding? I would like there to be an even number of zeros on each end of my data so that when I apply a window, my data are centered. Any help on this would be greatly appreciated.
example of code I'm using (i've attached an example mat file with the variable "prox")
a= hilbert(hann(length(prox)).*prox,2^8);

Respuesta aceptada

Matt J
Matt J el 23 de Mayo de 2019
Editada: Matt J el 23 de Mayo de 2019
Y = fft(X,n);
is the same as
Xp=X;
Xp(length(X)+1:n)=0;
Y=fft(Xp);
  8 comentarios
Avelino Amado
Avelino Amado el 23 de Mayo de 2019
I have done the fft, ifftshift, but what I'm still unsure of is when I apply a window. My understanding would be I would window after I pad with zeros, is that correct?
Matt J
Matt J el 23 de Mayo de 2019
That is something that only you can know (because it is your algorithm). But ifftshift would normally be done right before fft.

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