Suppose we have a total number N= 2048
points in a data and we wish to have zero centered Gaussian. There are two possibilities that we use the x-axis as
x1=[-1023:1:1024]; % x axis spans from -1023 to 1024 with 1 unit steps
x2=[-1024:1:1023]; % x axis spans from -1024 to 1023 with 1 unit steps
and if we make two zero centered Gaussians using these x values:
Gauss1=normpdf(x1,0, 10); % The syntax is normpdf(x, mean, standard deviation)
Gauss2=normpdf(x2,0,10);
and obtain their FTs as follows in MATLAB.
FFTGauss1=fft(Gauss1);
FFTGauss2=fft(Gauss2);
The real parts are identical and their magnitudes exactly match. For some reasons, the imaginary parts vary drastically. Why do we see large imaginary parts in one case and almost non-existent imaginary parts in the other? Thanks.