summaryrefslogtreecommitdiff
path: root/1535/CH4/EX4.6
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1535/CH4/EX4.6
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 '1535/CH4/EX4.6')
-rwxr-xr-x1535/CH4/EX4.6/Ch04Ex6.sci17
1 files changed, 17 insertions, 0 deletions
diff --git a/1535/CH4/EX4.6/Ch04Ex6.sci b/1535/CH4/EX4.6/Ch04Ex6.sci
new file mode 100755
index 000000000..7cff022d1
--- /dev/null
+++ b/1535/CH4/EX4.6/Ch04Ex6.sci
@@ -0,0 +1,17 @@
+// Scilab Code Ex4.6 : Page-93 (2010)
+n = 1; // Order of diffraction spectrum
+N = 6000e+02; // Number of lines per m on diffraction grating, per m
+D = 2; // Distance of screen from the source, m
+lambda1 = 400e-009; // Wavelength of blue light, m
+// We have sin(theta1) = n*N*lambda, solving for theta1
+theta1 = asind(n*N*lambda1); // Angle at first order diffraction for Blue light, degrees
+lambda2 = 750e-009; // Wavelength of blue light, m
+// We have sin(theta2) = n*N*lambda, solving for theta2
+theta2 = asind(n*N*lambda2); // Angle at first order diffraction for Red light, degrees
+x1 = D*tand(theta1); // Half width position at central maximum for blue color, m
+x2 = D*tand(theta2); // Half width position at central maximum for red color, m
+
+printf("\nThe width of first order spectrum on the screen = %4.1f cm", (x2 - x1)/1e-02);
+
+// Result
+// The width of first order spectrum on the screen = 51.3 cm \ No newline at end of file