Zero Padding the center of data

5 Ansichten (letzte 30 Tage)
Laiba Qadeer
Laiba Qadeer am 8 Mär. 2020
Kommentiert: Laiba Qadeer am 9 Mär. 2020
I am interpolating the signal by fourier transform. For this purpose, I have to fft on the signal, and the zero pad the center of the fourier transformed data (eg. if there are 32 data points, 32 zeros are to be added after the 16th data point (consisting of both real and imaginary number). Afterwards, this signal is inverse fourier transformed to get 2xinterpolation.
Please tell me which code can I use to zero-pad the center of the fourier transformed data.
Thanks,

Akzeptierte Antwort

Star Strider
Star Strider am 8 Mär. 2020
There is already a function to do this. See interpft for details.
  7 Kommentare
Star Strider
Star Strider am 9 Mär. 2020
It is straightforward to increase the frequency resolution of a Fourier transform (or time resulution of an inverse Fourier transform) by zero-padding it. In the fft or ifft functions, just specify a value for ‘n’ greater than the original signal length. The functions themselves take care of the rest. (Note that the ifft function allows the specification of the argument array to be conjugate symmetric.) The only absolute requirement is that the sampling times (or sampling frequencies) be regularly-spaced.
Laiba Qadeer
Laiba Qadeer am 9 Mär. 2020
Thank you both for your reply. I get what you are saying. I used these codes and got the result that I wanted.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by