summaryrefslogtreecommitdiff
path: root/2309/CH5/EX5.4
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.4
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.4')
-rwxr-xr-x2309/CH5/EX5.4/Ex5_4.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/2309/CH5/EX5.4/Ex5_4.sce b/2309/CH5/EX5.4/Ex5_4.sce
new file mode 100755
index 000000000..c5e8434f5
--- /dev/null
+++ b/2309/CH5/EX5.4/Ex5_4.sce
@@ -0,0 +1,24 @@
+// Chapter 5 Example 4
+//==============================================================================
+clc;
+clear;
+
+//input data
+lamda = 1.5418; // wavelength in Å
+h = 1; // miller indice
+k = 1; // miller indice
+l = 1; // miller indice
+n = 1; // given first order
+theta = 30; // diffraction angle in degrees
+
+// Calculations
+theta1 = theta*%pi/180; // degree to radian conversion
+// d = (n*lamda)/(2*sinθ); by Braggs law ------------- 1
+// d = a/sqrt((h^2)+(k^2)+(l^2)); interplanar distance ------------ 2
+// equating 1 and 2
+
+a = (n*lamda*sqrt((h^2)+(k^2)+(l^2))/(2*sin(theta1)))
+
+// Output
+mprintf('Interatomic spacing a = %f Å',a);
+//==============================================================================