diff options
Diffstat (limited to '1535/CH4/EX4.5')
-rwxr-xr-x | 1535/CH4/EX4.5/Ch04Ex5.sci | 21 |
1 files changed, 21 insertions, 0 deletions
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 |