summaryrefslogtreecommitdiff
path: root/2309/CH5/EX5.a.15/A_Ex5_15.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2309/CH5/EX5.a.15/A_Ex5_15.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2309/CH5/EX5.a.15/A_Ex5_15.sce')
-rwxr-xr-x2309/CH5/EX5.a.15/A_Ex5_15.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/2309/CH5/EX5.a.15/A_Ex5_15.sce b/2309/CH5/EX5.a.15/A_Ex5_15.sce
new file mode 100755
index 000000000..369fd9d14
--- /dev/null
+++ b/2309/CH5/EX5.a.15/A_Ex5_15.sce
@@ -0,0 +1,24 @@
+// Chapter 5 additional Example 15
+//==============================================================================
+clc;
+clear;
+
+//input data
+r = 1.246*10^-10; // atomic radius in m
+h1 = 1 // miller indice
+h2 = 2 // miller indice
+k0 = 0 // miller indice
+k1 = 1 // miller indice
+k2 = 2 // miller indice
+l0 = 0 // miller indice
+l1 = 1 // miller indice
+
+// Calculations
+a = (4*r)/sqrt(2); // lattice constant
+d111 = a/sqrt((h1^2)+(k1^2)+(l1^2)); // interplanar distance
+d200 = a/sqrt((h2^2)+(k0^2)+(l0^2)); // interplanar distance
+d220 = a/sqrt((h2^2)+(k2^2)+(l0^2)); // interplanar distance
+
+// Output
+mprintf('d111 = %3.3e m\n d200 = %3.4e m\n d220 = %3.3e m\n',d111,d200,d220');
+//==============================================================================