![]() |
||||||
|
| Script S5_2_20.m | |||
|
|||
|
%==============================================
%Fresnel diffraction at an edge %============================================== % %lambda in mm lambda=5e-4; %distance in mm for Fig. 5.51 b=4000; %distance in mm for Fig. 5.52 (first plot) % b=2050; %distance in mm for Fig. 5.52 (second plot) % b=90000; %distance in mm for Fig. 5.52 (third plot) % b=250000; %============================================== % %(-hmax,hmax)is the interval of vertical position y of a point (in mm) %on the screen A'B' with a step dy hmax=15; dy=0.1; y=-hmax:dy:hmax; Ly=length(y); %(0,tmax) is the interval of t %(vertical position of the free part of the edge) %in mm with a step dt tmax=100; dt=0.01; t=eps:dt:tmax; Lt=length(t); %a constant cost=pi/(lambda*b); %the loop over the y %to determine on the point distant y %the value of the Fresnel integral for i=1:Ly y1=y(i); arg1=(y1-t).^2; arg2=1i*cost*arg1; f=exp(arg2); E=trapz(t,f); Es=conj(E); Int(i)=E*Es; end Int; LI=length(Int); %============================================== % %relative value of intensity is determined Intmax=max(Int); Ir=Int/Intmax; %============================================== % %plot of relative intensity at the points of ordinate y on the screen plot(y,Ir,'r-') title('Relative intensity at the points of ordinate y on the screen') axis([-5 10 0 1]) %============================================== % |
|||
| Top | |||