I am not certain what you intend by ‘normalise’. You need to scale it by dividing the fft result by the length of the time-domain signal:
z = fftshift(fft(x1000)/length(x1000));
This ‘normalises’ the result, correcting for the total energy in the time-domain signal. (You can use the numel function instead of length for a vector. Read about both to understand where each is appropriate.)
Note that you are using the two-sided Fourier transform, so the signal intensity will be equally divided between the negative frequencies and positive frequencies. In a one-sided Fourier transform, correct for this by multiplying the fft output by 2 to reproduce the amplitude of the original signals.
Best Answer