![]() |
||||||
|
| Script S5_2_12.m | |||
|
|||
|
%==============================================
%Grating 1 %============================================== % %------------------------------------------------------ %le righe dallo zero al quinto ordine con un reticolo di diffrazione %per lambda=0.58958 micron; %prima senza il contributo della diffrazione sulle fenditure %poi con questo contributo %------------------------------------------------------ %N the number of slits N=1000; %lambda, d and h in microns lambda=0.58958; d=8; h=2 %angles corresponding to mm fringes %using the formula dsin(teta) = mmlambda mm=eps:5; %angular position in degrees of the fringes tetamm=(asin(mm*lambda/d))*(180/pi) %interval of angles between 0° and 18° % tetag=eps:0.001:18; %interval of angles between 0° and 37° tetag=eps:0.001:37; %number M of elements of tetag M=length(tetag) %their values in radians teta=tetag*pi/180; % %================================================ %relative intensity Ir2 due to interference using %the square of the formula sin(Nbeta)/Nsen(beta) %================================================ % beta=(pi*d*sin(teta))/lambda; arg=N*beta; num2=sin(arg); num2q=num2.*num2; den2=N*sin(beta); den2q=den2.*den2; %Ir2 Ir2=num2q./den2q; % %plot of Ir2 plot(tetag,Ir2,'ro-') axis([0 18 0 1]) title('Central line and the first four lines to its right') figure % %================================================ %relative intensity Ir1 due to diffraction using %the square of the formula sin(alfa)/alfa %================================================ % %angular position of the second minimum due to diffraction pos_g=(asin(2*lambda/h))*180/pi %preliminary calculi fatth=(pi*h)*sin(teta); alfa=fatth./lambda; coefn=sin(alfa).^2; coefd=alfa.^2; %Ir1 Ir1=coefn./coefd; %its plot plot(tetag,Ir1,'bd-') axis([0 37 0 1]) title('The diffraction curve including the first two minima') figure % %========================================================= %effective intensity of the lines before the first minimum %========================================================= % Ir=Ir1.*Ir2; plot(tetag,Ir1,'ro-',tetag,Ir,'bd-') title('Effective lines intensity before the first minimum') axis([0,18,0,1]) %============================================== % |
|||
| Top | |||