Zero Padding the center of data

8 views (last 30 days)
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,

Accepted Answer

Star Strider
Star Strider on 8 Mar 2020
There is already a function to do this. See interpft for details.
  7 Comments
Star Strider
Star Strider on 9 Mar 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 on 9 Mar 2020
Thank you both for your reply. I get what you are saying. I used these codes and got the result that I wanted.

Sign in to comment.

More Answers (0)

Products


Release

R2017a

Community Treasure Hunt

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

Start Hunting!