I want to make discrete transverse fourier transform for a normal gaussian but get some kind of delta function and can't understand why.
I should get gaussian in the time domain as well.
Here is the function:
close
clear
clc
lamda=1000:1e-2:6000; %nm
c=3e17; %nm/sec
L_Zblan=5e9; %nm
lamda0=(2800+2200)/2;
w0=2*pi*c/lamda0;
W=((2800-2200)/2)*2*pi*c/(lamda0)^2;
gauss=@(x,w0,W) (1/(W*sqrt(2*pi)))*exp(-((x-w0).^2)/(2*(W^2)));
w_plus=2.*pi.*c./lamda;
n_zblan=n_Zblan(lamda);
k_Zblan_w=n_zblan.*w_plus./c;
F1=gauss(w_plus,w0,W);
F=F1.*exp(-i.*k_Zblan_w.*L_Zblan);
t=lamda./c;
plot(t,abs(ifft(F1)))
Can anyone find what's wrong with this? I googled it and found fftshift but still didn't work with it as well. I'm doing something wrong.
Here is the n_Zblan function that I use here:
function [n]=n_Zblan(lamda)
a=0.3418;b=70.2017;c=0.9206;d=100.8285;e=0.3055;f=9951.44;
n2=1+a.*lamda.^2./(lamda.^2-b^2)+c.*lamda.^2./(lamda.^2-d^2)+e.*lamda.^2./(lamda.^2-f^2);
n=sqrt(n2);
end