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 /1619/CH1/EX1.7.1 | |
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 '1619/CH1/EX1.7.1')
-rwxr-xr-x | 1619/CH1/EX1.7.1/Example1_7_1.sce | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/1619/CH1/EX1.7.1/Example1_7_1.sce b/1619/CH1/EX1.7.1/Example1_7_1.sce new file mode 100755 index 000000000..d6d4a1294 --- /dev/null +++ b/1619/CH1/EX1.7.1/Example1_7_1.sce @@ -0,0 +1,13 @@ +// Example 1.7.1 page 1.14
+//To calculate the angel of refraction if the angle of incidence is 30
+
+clc;
+clear;
+n1= 1.5; // for glass
+n2= 1.33; // for water
+phi1= (%pi/6); // phi1 is the angel of incidence
+// According to Snell's law...
+// n1*sin(phi1)= n2*sin(phi2);
+sinphi2= (n1/n2)*sin(phi1); // phi2 is the angle of refraction..
+phi2 = asind(sinphi2);
+printf(' The angel of refraction is %.2f degrees',phi2);
|