summaryrefslogtreecommitdiff
path: root/3753/CH7/EX7.12
diff options
context:
space:
mode:
Diffstat (limited to '3753/CH7/EX7.12')
-rw-r--r--3753/CH7/EX7.12/Ex7_12.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/3753/CH7/EX7.12/Ex7_12.sce b/3753/CH7/EX7.12/Ex7_12.sce
new file mode 100644
index 000000000..5f1817e51
--- /dev/null
+++ b/3753/CH7/EX7.12/Ex7_12.sce
@@ -0,0 +1,19 @@
+//Example number 7.12, Page number 7.18
+
+clc;clear;close
+
+// Variable declaration
+a=3.16 // in m
+lamda=1.54 // in m
+n=1// unitless
+theta=20.3*%pi/180 // radian
+
+// Calculations
+d=(n*lamda)/(2*sin(theta)) // in m
+x=a/d // let sqrt(h^2+k^2+l^2)=x
+
+// Result
+printf("d = %.2f Angstrom",d)
+printf("\nsqrt(h^2+k^2+l^2) = %.3f ",x)
+printf("\nTherefore, h^2+k^2+l^2 =sqrt(2)")
+printf("\nh =1, k=1")