0

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
elis02
  • 13
  • 7
  • Not sure if this helps, but if you change `plot` for `semilogy` you can see the spread of the `ifft` more easily – Steve Jun 07 '17 at 13:38
  • thanks, but it still does not give me the answers to what I am looking for. for people who read this, this code gives me something like a gaussian: plot(t,abs(fftshift(ifft((F1)))),'b') But it still doesn't correspond to what I need. since it's a gaussian the width should correspond to detla(t)*delta(W)=2*pi*0.44 But here it doesn't. – elis02 Jun 07 '17 at 14:53

0 Answers0