summaryrefslogtreecommitdiff
path: root/3537/CH7/EX7.5/Ex7_5.sce
diff options
context:
space:
mode:
Diffstat (limited to '3537/CH7/EX7.5/Ex7_5.sce')
-rw-r--r--3537/CH7/EX7.5/Ex7_5.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/3537/CH7/EX7.5/Ex7_5.sce b/3537/CH7/EX7.5/Ex7_5.sce
new file mode 100644
index 000000000..6e544b5ec
--- /dev/null
+++ b/3537/CH7/EX7.5/Ex7_5.sce
@@ -0,0 +1,15 @@
+//Example 7_5
+clc();
+clear;
+//To calculate number of reflections per meter and total distance covered
+n1=1.5
+n2=1.49
+phi=asin(n2/n1)*180/%pi //units in degrees
+a=25 //units in micro meters
+leng=2*a*tan(phi*%pi/180) //units inmicro meters
+totalnum=10^6/leng
+printf("Total number of reflections is %d\n",totalnum)
+l=1 //units in meters
+distance=l*(sin(phi*%pi/180))
+printf("Total distance covered is %.4f Meters",distance)
+//in text book answer printed wrong as 1.006mcorrect answer is 0.9933meters