# Fourier Transform of a Pulse Train (Frequency Comb Simulation)

I am trying to take a Fourier transform of a femtosecond pulse train and plot the frequency spectrum.
I followed this question and am able to create a pulse train and plot both the time and frequency domain.
My question is, why do the pulses overlap in the time domain graph, since their width is on the order of femtoseconds, and the distance between them (T) is much larger?
Is it an issue with my time vector or am I interpreting the graph incorrectly?

%Using a Gaussian carrier envelope for the e-field, I show a comb of laser
%frequencies defining frep, and its representation in freq space. The
%sampling frequency is 10 times the freq (f=10*fs, fs=fr so fr=f/10).

%Define variables
fr=120e6;             %rep rate, units: Hz
fs=10*fr;             %sampling frequency, units: Hz
T=1/fs;               %period, units: s (~fs) (sampling time)
tau=100e-15;           %proportional to pulse duration, units: s
%tau=(pulse_duration)/sqrt(2*log(2));
wl=2*pi*fr;           %carrier frequency, units: Hz
ceo=0;                %offset freq., can change later

%Define electric field
L=1500;               %sets axis length
t=(0:L-1)*T;          %time, units: s

Es=zeros(length(t));
for n=0:100           %n is the number of pulses (depends on L)
for i=1:length(t)
Es(n+1,i)=exp(-(t(i)-n*T)^2/tau^2)*exp(-1i*wl*t(i));
end
end
E=sum(Es,1);

%Fourier Transform to frequency
F=abs(fft(E));        %Fourier transform the vector Es
FT=F(L/2:L-1);           %Take out half due to symmetry
FTn=FT/max(FT);        %Normalized y-axis
f=(1/L)*(L/2:L-1)*fs;    %Frequency for plotting

%Plots versus time and frequency
figure(1)
plot(t,real(E))
xlim([0 max(t)/2])
xlabel('Time (s)')
ylim([-1.2 1.2])
ylabel('Amplitude')
figure(2)
plot(f,FTn,'k')
xlabel('Frequency (Hz)')
xlim([min(f) max(f)])
ylabel('Normalized Amplitude')

• Your sampling time (1/fs) in not small enough to sample $\tau$. – Harris Sep 10 '15 at 13:07
• I would also normalize everything to femto seconds to avoid having to work with very small numbers. – Harris Sep 10 '15 at 13:13
• if this question was more fresh, i might be interested in answering it. – robert bristow-johnson Mar 4 '17 at 2:54