summaryrefslogtreecommitdiff
path: root/2795/CH5/EX5.1/Ex5_01.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2795/CH5/EX5.1/Ex5_01.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 '2795/CH5/EX5.1/Ex5_01.sce')
-rwxr-xr-x2795/CH5/EX5.1/Ex5_01.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/2795/CH5/EX5.1/Ex5_01.sce b/2795/CH5/EX5.1/Ex5_01.sce
new file mode 100755
index 000000000..8aabd9f86
--- /dev/null
+++ b/2795/CH5/EX5.1/Ex5_01.sce
@@ -0,0 +1,15 @@
+// Scilab Code Ex5.1 :Page-167 (2013)
+clc; clear;
+N_A = 6.022e+23; // Avogdaro's No., per mole
+n = 1; // Order of diffraction
+M = 58.5; // Molecular mass of NaCl, g/mol
+rho = 2.16; // Density of rock salt, g/cc
+two_theta = 20; // Scattering angle, degree
+theta = two_theta/2; // Diffraction angle, degree
+N = N_A*rho*2/(M*1e-006); // Number of atoms per unit volume, per metre cube
+d = (1/N)^(1/3); // Interplanar spacing of NaCl crystal, m
+lambda = 2*d*sind(theta)/n ; // Wavelength of X-rays using Bragg's law, m
+printf("\nThe wavelength of the incident X rays = %5.3f nm", lambda/1e-009);
+
+// Result
+// The wavelength of the incident X rays = 0.098 nm