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 /1535/CH4/EX4.5 | |
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 '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 |