# Inverse FFT of complex exponential with time delay - window leakage?

I am working in MATLAB with a frequency domain signal that is a sum of complex exponentials, e.g.

$$X(\omega) = \sum_i e^{-j\omega t_i}$$ where $$t_i > 0$$ $$\forall$$ $$i$$

I expect the output to be a sum of delta functions, e.g. $$x(t) = F^{-1}[X(\omega)] \approx \sum_i \delta(t_i)$$

I have noticed that when the time bin lines up exactly with the $$t_i$$, I get an excellent $$\delta(t_i)$$ function. However when the time bin is off slightly, there is significant energy spread throughout the rest of the time axis, as below:

## Does anyone have a clearer idea why this happens? Or even better, a solution? (Perhaps a window that better treats these delta functions?, or a better way to do this IFFT?) Code used to generate image is below

Nfft = 2^12;
Tend = 20e-9;%20 ns of runtime
t = linspace(0,Tend,Nfft); %time
Ts = t(2) - t(1); %sampling rate, s
Fs = 1/Ts; %sampling rate, Hz
f = (-Fs/2):Fs/Nfft:(Fs/2 - Fs/Nfft); %frequency

%create complex exps. with delays 4ns, 6ns, 10ns
%4 ns exists as a time bin
ts = [4e-9 6e-9 10e-9];

%create exponentials
exps = zeros(length(ts),length(f));
for k = 1:length(ts)
exps(k,:) = exp(-1j .* 2*pi.*f .*ts(k));
end
X_f = sum(exps); %create f-domain signal

x_t =real(ifft((X_f))); %ifft

plot(t.*1e9,20.*log10(x_t)); %plot
xlabel('Time, ns'); ylabel('dB');