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.8/Ch06Ex8.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 '1871/CH6/EX6.8/Ch06Ex8.sce')
-rwxr-xr-x | 1871/CH6/EX6.8/Ch06Ex8.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/1871/CH6/EX6.8/Ch06Ex8.sce b/1871/CH6/EX6.8/Ch06Ex8.sce new file mode 100755 index 000000000..11963c1e5 --- /dev/null +++ b/1871/CH6/EX6.8/Ch06Ex8.sce @@ -0,0 +1,21 @@ +// Scilab code Ex6.8: Pg:250 (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
+C = 48; // Critical angle of incidence, degree
+mu = 1/sind(C); // Index of refraction
+// From Brewester's law mu = tan i_p, solving for i_p
+i_p = atand(mu); // Polarizing angle, degree
+// Since i_p + r = %pi/2, solving for r
+r = 90 - i_p; // Angle of refraction, degree
+[d1, m1] = deg2degmin(i_p);
+[d2, m2] = deg2degmin(r);
+printf("\nThe polarizing angle = %2d degree %2d minute", d1, m1);
+printf("\nThe angle of refraction = %2d degree %2d minute", d2, m2);
+
+// Result
+// The polarizing angle = 53 degree 23 minute
+// The angle of refraction = 36 degree 38 minute
\ No newline at end of file |