summaryrefslogtreecommitdiff
path: root/3768/CH4/EX4.3/Ex4_3.sce
blob: b69bc2af175a6a5e21a7ed2ed17944e79a0c1499 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//Example number 4.3, Page number 66

clc;clear;
close;

//Variable declaration
a=0.28*10**-9;    //lattice spacing(m)
n=2;   //order
lamda=0.071*10**-9;    //wavelength(m)
h=1;
k=1;
l=0;
//Calculation
d110=a/sqrt(h**2+k**2+l**2);     //spacing(m)
theta=asin(n*lamda/(2*d110));    //glancing angle(radian)
theta=theta*180/%pi;          //glancing angle(degrees)
//Result
printf("glancing angle is %.2f degree",theta)
//answer in the book is wrong