summaryrefslogtreecommitdiff
path: root/3869/CH7/EX7.14/Ex7_14.sce
blob: 2b5467669641d9702a6d101da0f2fe405087444e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clear
//
//
//

//Variable declaration
lamda=97         //wavelength(pm)
n1=1             //order
n2=3             //order      
theta1=23*%pi/180       //glancing angle(radian)
theta2=60*%pi/180       //glancing angle(radian)

//Calculation
lamda1=n2*lamda*sin(theta1)/(n1*sin(theta2))     //wavelength(pm)
d=n2*lamda/(2*sin(theta2))            //interplanar spacing(pm)

//Result
printf("\n wavelength is %0.1f  pm",lamda1)
printf("\n interplanar spacing is %0.0f  pm",d)
printf("\n answer for wavelength given in the book varies due to rounding off errors")