diff options
Diffstat (limited to '3840/CH3/EX3.9/Ex3_9.sce')
-rw-r--r-- | 3840/CH3/EX3.9/Ex3_9.sce | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/3840/CH3/EX3.9/Ex3_9.sce b/3840/CH3/EX3.9/Ex3_9.sce new file mode 100644 index 000000000..36f6d2d54 --- /dev/null +++ b/3840/CH3/EX3.9/Ex3_9.sce @@ -0,0 +1,24 @@ +clear +// +// +// + +//Variable declaration +a=0.26 //lattice spacing(nm) +lamda=0.065 //wavelength of X-rays(nm) +h=1 +k=1 +l=0 +n=2 + +//Calculation +d=a/sqrt(h**2+k**2+l**2) +sintheta=n*lamda/(2*d) +theta=asin(sintheta)*180/%pi //glancing angle(degrees) +thetad=int(theta) //glancing angle(degrees) +thetam=(theta-thetad)*60 //glancing angle(minutes) +thetas=60*(thetam-int(thetam)) //glancing angle(seconds) + +//Result +printf("\n glancing angle is %0.3f degrees %0.3f minutes %0.3f seconds",thetad,thetam,thetas) +printf("\n answer in the book is wrong") |