Get time signal back after NFFT
3 views (last 30 days)
I have the following code, which generate a complex chirp signal.
fs = 200e6
t1 = 1e-3;
i = mychirp(t,f0,t1,f1);
q = mychirp_sine(t,f0,t1,f1);
x = complex(i,q);
L = length(x);
NFFT = 2^nextpow2(L)*4;
X = fftshift((fft(x,NFFT)));
f = fs*(-NFFT/2:NFFT/2-1)/NFFT;
Here is what I got in time domain and frequency domain :
Now I would like to go back in the Time domain after my FFT computed with the factor NFFT. Does anyone know how to compute the time vector in order to plot(timeVector,ifft(X)) ? I would like to plot my original signal after the IFFT.
Christoph F. on 27 Sep 2017
The time vector as as many elements as X, and they are spaced 1/(f(2)-f(1)) apart.
And you will probably need to reverse the fftshift performed on X with ifftshift(X) before doing an ifft.