summaryrefslogtreecommitdiff
path: root/1847/CH3/EX3.39/Ch03Ex39.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1847/CH3/EX3.39/Ch03Ex39.sce
downloadScilab-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.39/Ch03Ex39.sce')
-rwxr-xr-x1847/CH3/EX3.39/Ch03Ex39.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/1847/CH3/EX3.39/Ch03Ex39.sce b/1847/CH3/EX3.39/Ch03Ex39.sce
new file mode 100755
index 000000000..9ce45f5a3
--- /dev/null
+++ b/1847/CH3/EX3.39/Ch03Ex39.sce
@@ -0,0 +1,12 @@
+// Scilab Code EX3.39:: Page-3.55 (2009)
+clc;clear;
+lambda1 = 5890e-008; // Wavelength of sodium D1 line, cm
+lambda2 = 5896e-008; // Wavelength of sodium D2 line, cm
+d_lambda = lambda2-lambda1; // Difference in the wavelength of two lines, cm
+n = 2; // Order of diffraction
+// As lambda/d_lambda = n*N, solving for N
+N = lambda1/(d_lambda*n); // Minimum number of lines in a grating
+printf("\nThe minimum number of lines in a grating = %3d lines", N);
+
+// Result
+// The minimum number of lines in a grating = 490 lines