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 /1847/CH3/EX3.28 | |
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 '1847/CH3/EX3.28')
-rwxr-xr-x | 1847/CH3/EX3.28/Ch03Ex28.sce | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/1847/CH3/EX3.28/Ch03Ex28.sce b/1847/CH3/EX3.28/Ch03Ex28.sce new file mode 100755 index 000000000..92a18d46d --- /dev/null +++ b/1847/CH3/EX3.28/Ch03Ex28.sce @@ -0,0 +1,16 @@ +// Scilab Code Ex3.28:: Page-3.48 (2009)
+clc; clear;
+lambda1 = 6500e-008; // Wavelength of first line, cm
+lambda2 = 4500e-008; // Wavelength of scecond line, cm
+theta1 = 18; // Direction of lower order, degrees
+theta2 = 18; // Direction of higher order, degrees
+// As (a+b)*sin(theta1) = n*lambda1 and (a+b)*sin(theta2) = (n+1)*lambda2, solving for n
+n = lambda2/(lambda1 - lambda2); // Order of diffraction for first wavelength
+// As a_plus_b = n*lambda1/sind(theta1), solving for a_plus_b
+a_plus_b = ceil(n)*lambda1/sind(theta1); // Grating element, cm
+N = 1/a_plus_b; // No. of lines on the grating surface, lines/cm
+
+printf("\nThe number of lines ruled on the grating surface = %4d lines/cm", N);
+
+// Result
+// The number of lines ruled on the grating surface = 1584 lines/cm
|