summaryrefslogtreecommitdiff
path: root/3537/CH5/EX5.18/Ex5_18.sce
diff options
context:
space:
mode:
Diffstat (limited to '3537/CH5/EX5.18/Ex5_18.sce')
-rw-r--r--3537/CH5/EX5.18/Ex5_18.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/3537/CH5/EX5.18/Ex5_18.sce b/3537/CH5/EX5.18/Ex5_18.sce
new file mode 100644
index 000000000..d76469d02
--- /dev/null
+++ b/3537/CH5/EX5.18/Ex5_18.sce
@@ -0,0 +1,14 @@
+//Example 5_18
+clc();
+clear;
+//To calculate the glancing angle
+h=1
+k=1
+l=0
+lamda=0.065*10^-9 //units in m
+n=2
+a=0.26*10^-9 //units in nm
+sintheta=(n*lamda*sqrt(h^2+k^2+k^2))/(2*a)
+theta=asin(sintheta)*180/%pi //units in degrees
+printf("Theta=%.2f degrees",theta)
+//the answer in the textbook is given wrong as theta=20.7 degrees but the right answer is 25.66 degrees