# FFT function of Gaussian pulse

I need gaussian pulse fft. I set the sigma of gaussian pulse 1e-10 and define the gaussian function in time and use the fft. as you know the amplitude of should be unit in frequency domain. but my result shows that the amplitude of the pulse in frequency domain equal to 1/end_time. for example, if i define the time as t=0:1/fs:1e-07 then the amplitude of X(f) is 1e7 and I changed the end_time then the amplitude respectively change.

this is my code :

clear all;
clc;
fs=1e10; %sampling frequency
sigma=1e-10;

end_time=1e-7;

t=0:1/fs:1e-7; %time base

t_s=1e-8;
variance=sigma^2;
x=1/(sqrt(2*pi*variance))*(exp(-(t-t_s).^2/(2*variance)));
subplot(2,1,1)
plot(t,x,'b');
title(['Gaussian Pulse \sigma=', num2str(sigma),'s']);
xlabel('Time(s)');
ylabel('Amplitude');

L=length(x);

X =fftshift(fft(x,L));
Pxx=X.*conj(X)/(L*L); %computing power with proper scaling
f = fs*(0:L-1)/L; %Frequency Vector

subplot(2,1,2)
plot(f,abs(X)/(L),'r');
title('Magnitude of FFT');
xlabel('Frequency (Hz)')
ylabel('Magnitude |X(f)|');
xlim([0 1e10])


The FFT algorithm is not usually normalized while giving the output. Hence it is not unity.It gives as The Fourier transform is taken as $$F(e^{jw})=\sum x[n] e^{-jwn}$$ Thus you could see the sum of x's when w=0 case instead of normalized one