summaryrefslogtreecommitdiff
path: root/2411/CH7/EX7.18/Ex7_18.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2411/CH7/EX7.18/Ex7_18.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 '2411/CH7/EX7.18/Ex7_18.sce')
-rwxr-xr-x2411/CH7/EX7.18/Ex7_18.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/2411/CH7/EX7.18/Ex7_18.sce b/2411/CH7/EX7.18/Ex7_18.sce
new file mode 100755
index 000000000..464c0ae4a
--- /dev/null
+++ b/2411/CH7/EX7.18/Ex7_18.sce
@@ -0,0 +1,12 @@
+// Scilab Code Ex7.18: Page-384 (2008)
+clc; clear;
+lambda = 1.8e-010; // Wavelength of the X rays, m
+n = 1; // Order of diffraction
+theta = 60; // Angle of diffraction for the first order, degree
+d = n*lambda/(2*sind(theta)); // Interplanar spacing, m
+// Since for a simple cubic lattice, d_111 = d = a/sqrt(3), solving for a
+a = sqrt(3)*d; // The interatomic spacing for the given crystal planes, m
+printf("\nThe interatomic spacing for the given crystal planes, a = %3.1f angstrom", a/1e-010);
+
+// Result
+// The interatomic spacing for the given crystal planes, a = 1.8 angstrom \ No newline at end of file