summaryrefslogtreecommitdiff
path: root/3710/CH8/EX8.4/Ex8_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '3710/CH8/EX8.4/Ex8_4.sce')
-rw-r--r--3710/CH8/EX8.4/Ex8_4.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/3710/CH8/EX8.4/Ex8_4.sce b/3710/CH8/EX8.4/Ex8_4.sce
new file mode 100644
index 000000000..d7686abca
--- /dev/null
+++ b/3710/CH8/EX8.4/Ex8_4.sce
@@ -0,0 +1,18 @@
+//Example 8.4, Page Number 375
+//The Function fpround(dependency) is used to round a floating point number x to n decimal places
+//Number of modes in a fiber
+clc;
+
+n1=1.48//refractive index
+n2=1.46//refractive index
+l=0.9*(10**-6) //Wavelength in meters
+r=100*(10**-6) //Core radius in meter
+
+V=(2*%pi*r*sqrt((n1**2)-(n2**2)))/l
+V=fpround(V,1)
+N=(V**2)/2 //N is the Number of Modes
+N=fpround(N,1)
+mprintf("The Value of V is:%.1f\n",V)
+mprintf(" The Number of Modes able to propagate is:%.1f",N)
+
+//The difference arising is due to approximation