summaryrefslogtreecommitdiff
path: root/2780/CH2/EX2.13/Ex2_13.sce
blob: 220d870bc9ecacdf67ed6f41442f767984518ff9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clc
//to calculate intensity
mu=1.5 //refractive index(unitless)
t=1.5*10^-6 //thickness of thin glass plate in m
pathdifference=(mu-1)*t // in m
lambda=5*10^-7 //wavelength in m
//del=2*%pi*pathdifference/lambda
del=3*%pi
a1=1
      //where a1=a2=a
a2=1
//formula is I=a1^2+a2^2+2*a1*a2*cos del
// where cos 3%pi=-1
I=a1^2+a2^2+2*a1*a2*(-1) 
disp("the intensity at the centre of the screen is I="+string(I)+"unitless" )
//to calculate lateral shift
D=1 //distance in m
twod=5*10^-4 //distance between two slits in m
mu=1.5 //refractive index (unitless)
t=1.5*10^-6 //thickness of thin glass plate in m
x0=D*(mu-1)*t/twod
disp("the lateral shift of the central maximum is x0="+string(x0)+"m")