From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 635/CH8/EX8.11/Ch08Ex11.sci | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 635/CH8/EX8.11/Ch08Ex11.sci (limited to '635/CH8/EX8.11/Ch08Ex11.sci') 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 -- cgit