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.38/Ch03Ex38.sce | |
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.38/Ch03Ex38.sce')
-rwxr-xr-x | 1847/CH3/EX3.38/Ch03Ex38.sce | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/1847/CH3/EX3.38/Ch03Ex38.sce b/1847/CH3/EX3.38/Ch03Ex38.sce new file mode 100755 index 000000000..bb6a34686 --- /dev/null +++ b/1847/CH3/EX3.38/Ch03Ex38.sce @@ -0,0 +1,23 @@ +// Scilab Code EX3.38:: Page-3.52 (2009) +clc;clear; +function [mint, secnd]=degmin(theta) + mint = (theta-floor(theta))*60; + secnd = (mint-floor(mint))*60 +endfunction +lambda_D1 = 5890e-008; // Wavelength of sodium D1 line, cm +lambda_D2 = 5896e-008; // Wavelength of sodium D2 line, cm +n = 2; // Order of diffraction +N = 6500; // Number of lines per cm on grating, lines/cm +a_plus_b = 1/6500; // Grating element, cm +// As a_plus_b*sin(theta1)=n*lambda1, solving for theta1 +theta1 = asind(n*lambda_D1/a_plus_b); +// As a_plus_b*sin(theta2)=n*lambda2, solving for theta1 +theta2 = asind(n*lambda_D2/a_plus_b); +d_theta = theta2-theta1; // Angular separation between the sodium D1 and D2 lines, degrees +[mint, secnd] = degmin(d_theta); // Call deg_2_degmin function + +printf("\nThe angular separation between the sodium D1 and D2 lines = %d minutes %d seconds", mint, secnd); + +// Result +// The angular separation between the sodium D1 and D2 lines = 4 minutes 10 seconds +// Since theta1 and theta2 are rounded off in the textbook, therefore the answer is mismatching. |