summaryrefslogtreecommitdiff
path: root/2411/CH7/EX7.13/Ex7_13.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.13/Ex7_13.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.13/Ex7_13.sce')
-rwxr-xr-x2411/CH7/EX7.13/Ex7_13.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/2411/CH7/EX7.13/Ex7_13.sce b/2411/CH7/EX7.13/Ex7_13.sce
new file mode 100755
index 000000000..4d3da4edc
--- /dev/null
+++ b/2411/CH7/EX7.13/Ex7_13.sce
@@ -0,0 +1,12 @@
+// Scilab Code Ex7.13: Page-381 (2008)
+clc; clear;
+n = 1; // Order of diffraction
+lambda = 1.75e-010; // Wavelength of X rays, m
+h = 1, k = 1, l = 1; // Miller indices for the set of planes
+theta = 30; // Bragg's angle, degree
+// As from Bragg's law, 2*d*sind(theta) = n*lambda and d = a/sqrt(h^2+k^2+l^2). solving for a we have
+a = sqrt(h^2+k^2+l^2)*n*lambda/(2*sind(theta)*1e-010); // Interatomic spacing of the crystal, angstrom
+printf("\nThe interatomic spacing of the crystal = %5.3f angstrom", a);
+
+// Result
+// The interatomic spacing of the crystal = 3.031 angstrom \ No newline at end of file