![]() |
||||||
|
| Script S5_1_3.m | |||
|
|||
|
%===============================================
%Fraunhofer diffraction from a circular aperture %Attention! The function fdisk is used %The MATLAB bessel function isn't used %=============================================== % %radius R of circular aperture in microns R=1000; %wavelenght in microns lambda=0.5; %the standard parameter k k=2*pi/lambda; %the number N of elements of the arrays I and teta_g %and of the array s of the function fdisk, too N=1000 %elements of array I are set initially to zero I=zeros(1,N); %angles in degrees and in radians tetag=linspace(-0.05,0.05,N); teta=tetag*(pi/180); %intensity for each angle for i=1:N v=R*k*sin(teta(i)); y(i)=fdisk(v,N); ys(i)=conj(y(i)); I(i)=((y(i)*ys(i))); end I; %plot of the relative intensity varying tetag (in degrees) %with radius R = 1 mm for the circular aperture plot(tetag,I,'ro-'), grid on title('Relative intensity varying tetag with radius R = 1 mm for the circular aperture') figure % %============================================== %values about the first minimum of intensity %============================================== %a restricted interval %looking for the first minimum of I %to the right of the maximum e1=N/2; e2=3*N/4; Ixmin=I(e1:e2) %corresponding angles in the rstricted interval tetaxmin=tetag(e1:e2) %minimum and its position [min_di_I,ind]=min(Ixmin) %angle in radians corresponding to the minimum teta_min=(tetaxmin(ind))*(pi/180) %the value of m corrsponding to the similar %value for a single slit m=2*R*sin(teta_min)/lambda %radius r of the Airy's disk varying L %distance from the screen, where the light spot appears, %to the position of the circular aperture %both (r and L) are in mm L=(0.5:0.5:10)*1000; r=L*tan(teta_min); plot(L,r,'bd-'),grid on title('Radius r of the Airy disk varying L (both, r and L, are in mm)') %=============================================== % |
|||
| Top | |||
| Function fdisk.m | |||
|
|||
|
%==============================================
%Function fdisk %necessary to run the script %Fraunhofer diffraction from a circular aperture %============================================== % %calculus of the integral %for diffraction froma circular aperture (see Sec. 5.1.3) %with fixed values of %R the radius of the circular aperture in microns %the wavelength lambda in microns %of teta in radians %these three values are included in the array v %N is the number of elements of the array s function fdisk=f(v,N); %the array s between -1 and 1 s=linspace(-1,1,N); %preliminary calculi fatt1=i*v*s; fatt2=exp(fatt1); fatt3=s.*s; fatt4=1-fatt3; fatt5=sqrt(fatt4); arg=fatt2.*fatt5; %calculus of the integral using the simplest %MATLAB function for the integration fdisk=(2/pi)*trapz(s,arg); %============================================== % |
|||
| Top | |||