Zero-Padding Position for FFT
Hi,
I have a time-domain signal x with 5000 samples with period T, and it spans from -0.5*T to +0.5*T.
I want to compute an 8000-point FFT and I am confused about where I should add the zero-padding. Which of the following two methods is correct?
First:
x = [x; zeros(1, 3000)];
X = fftshift( fft( fftshift(x), 8000) );
Second:
x = [zeros(1, 1500); x; zeros(1, 1500)];
X = fftshift( fft( fftshift(x), 8000) );
Thanks!Hi,
I have a time-domain signal x with 5000 samples with period T, and it spans from -0.5*T to +0.5*T.
I want to compute an 8000-point FFT and I am confused about where I should add the zero-padding. Which of the following two methods is correct?
First:
x = [x; zeros(1, 3000)];
X = fftshift( fft( fftshift(x), 8000) );
Second:
x = [zeros(1, 1500); x; zeros(1, 1500)];
X = fftshift( fft( fftshift(x), 8000) );
Thanks! Hi,
I have a time-domain signal x with 5000 samples with period T, and it spans from -0.5*T to +0.5*T.
I want to compute an 8000-point FFT and I am confused about where I should add the zero-padding. Which of the following two methods is correct?
First:
x = [x; zeros(1, 3000)];
X = fftshift( fft( fftshift(x), 8000) );
Second:
x = [zeros(1, 1500); x; zeros(1, 1500)];
X = fftshift( fft( fftshift(x), 8000) );
Thanks! fft MATLAB Answers — New Questions