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 --- 1535/CH4/EX4.5/Ch04Ex5.sci | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 1535/CH4/EX4.5/Ch04Ex5.sci (limited to '1535/CH4/EX4.5') diff --git a/1535/CH4/EX4.5/Ch04Ex5.sci b/1535/CH4/EX4.5/Ch04Ex5.sci new file mode 100755 index 000000000..f879748e8 --- /dev/null +++ b/1535/CH4/EX4.5/Ch04Ex5.sci @@ -0,0 +1,21 @@ +// Scilab Code Ex4.5 : Page-92 (2010) +N = 4000e+02; // Number of lines per m on grating, per m +// For Blue Line +lambda = 450e-009; // Wavelength of blue light, m +n = 3; // Order of diffraction spectrum +// We have sin(theta) = n*N*lambda, solving for sin(theta) +sin_theta_3 = n*N*lambda; // Sine of angle at third order diffraction +// For Red Line +lambda = 700e-009; // Wavelength of blue light, m +n = 2; // Order of diffraction spectrum +// We have sin(theta) = n*N*lambda, solving for sin(theta) +sin_theta_2 = n*N*lambda; // Sine of angle at second order diffraction +// Check for overlapping +if abs(sin_theta_3 - sin_theta_2) < 0.05 then + printf("\nThe two orders overlap."); +else + printf("\nThe two orders do not overlap."); +end + +// Result +// The two orders overlap. \ No newline at end of file -- cgit