summaryrefslogtreecommitdiff
path: root/24/CH37/EX37.1/Example37_1.sce
blob: 7ec34c8ff07993ab2effce83039f149dbde358de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
exec('degree_rad.sci', -1)

//Given that
lambda = 650*10^-9  //in meter
theta = dtor(15)  //in radians

//Sample Problem 37-1a
printf("**Sample Problem 37-1a**\n")
//We know that [a*sin(theta) = m*lambda] for m=Integer
m = 1
a = m*lambda/sin(theta)
printf("The slit width is equal to %fnm\n", a*10^9)

//Sample Problem 37-1b
printf("\n**Sample Problem 37-1b**\n")
m = 3/2  //for first side maxima
lambdaDESH = a*sin(theta)/ m
printf("The wavelength of the light is equal to %fnm", lambdaDESH*10^9)