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 /1871/CH6/EX6.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 '1871/CH6/EX6.5')
-rwxr-xr-x | 1871/CH6/EX6.5/Ch06Ex5.sce | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/1871/CH6/EX6.5/Ch06Ex5.sce b/1871/CH6/EX6.5/Ch06Ex5.sce new file mode 100755 index 000000000..d4f2449a0 --- /dev/null +++ b/1871/CH6/EX6.5/Ch06Ex5.sce @@ -0,0 +1,19 @@ +// Scilab code Ex6.5: Pg:249 (2008)
+clc;clear;
+// Define function to convert degrees to degree and minute
+function [deg, minute] = deg2degmin(theta)
+ deg = floor(theta);
+ minute = ceil((theta-deg)*60);
+endfunction
+I_m = 1; // For simplicity assume maximum intensity to be unity, unit
+I0 = I_m; // Initial intensity, unit
+I = I_m/3; // Final intensity, unit
+// From Malus' Law. I = I0*cosd(theta)^2, solving for theta
+theta = acosd(sqrt(I/I0)); // The angle between two polarizing sheets, degree
+[d1, m1] = deg2degmin(theta); // Call conversion function
+[d2, m2] = deg2degmin(180-theta); // Call conversion function for supplement
+printf("\nThe angle between two polarizing sheets = %2d degree %2d minute = %2d degree %2d minute", d1, m1, d2, m2);
+
+// Result
+// The angle between two polarizing sheets = 54 degree 45 minute = 125 degree 16 minute
+// The answer is given wrongly in the textbook
\ No newline at end of file |