diff options
Diffstat (limited to '1619/CH1/EX1.7.1/Example1_7_1.sce')
-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);
|