diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /635/CH8/EX8.11/Ch08Ex11.sci | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '635/CH8/EX8.11/Ch08Ex11.sci')
-rwxr-xr-x | 635/CH8/EX8.11/Ch08Ex11.sci | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/635/CH8/EX8.11/Ch08Ex11.sci b/635/CH8/EX8.11/Ch08Ex11.sci new file mode 100755 index 000000000..bba9877e6 --- /dev/null +++ b/635/CH8/EX8.11/Ch08Ex11.sci @@ -0,0 +1,19 @@ +// Scilab code Ex8.11: Determining the wavelength of diffracted X-rays Page 262 (2010)
+d = 2.814e-010; // Interplanar spacing of rocksalt crystal, m
+theta = 9; // Bragg's angle, degree
+// 2*d*sin(theta) = n*lambda **Bragg's law, n is the order of diffraction
+// Solving for lambda, we have
+// lambda = 2*d*sin(theta)/n;
+printf("\nThe first four wavelengths of diffracted beam are:");
+for n = 1:1:5 // For diffraction order from 1 to 5
+ lambda = 2*d*sind(theta)/n; // Wavelength of X-rays, m
+ if lambda >= 0.2e-010 & lambda <= 1.0e-010 then
+ printf("\nLambda%d = %6.4e angstrom", n, lambda/1D-10);
+ end
+end
+// Result
+// The first four wavelengths of diffracted beam are:
+// Lambda1 = 8.8041e-001 angstrom
+// Lambda2 = 4.4021e-001 angstrom
+// Lambda3 = 2.9347e-001 angstrom
+// Lambda4 = 2.2010e-001 angstrom
\ No newline at end of file |