summaryrefslogtreecommitdiff
path: root/3710/CH8/EX8.2/Ex8_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '3710/CH8/EX8.2/Ex8_2.sce')
-rw-r--r--3710/CH8/EX8.2/Ex8_2.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/3710/CH8/EX8.2/Ex8_2.sce b/3710/CH8/EX8.2/Ex8_2.sce
new file mode 100644
index 000000000..cd07c94e8
--- /dev/null
+++ b/3710/CH8/EX8.2/Ex8_2.sce
@@ -0,0 +1,18 @@
+//Example 8.2, Page Number 369
+//The Function fpround(dependency) is used to round a floating point number x to n decimal places
+//Number of modes in a planar dielectic guide
+clc;
+
+w=100*(10**-6) //Thickness in meter
+n1=1.48//refractive index
+n2=1.46//refractive index
+l=1*(10**-6) //Wavelength of light in meters
+
+V=((%pi*w)/l)*sqrt((n1**2)-(n2**2))
+V1=(2*V)/%pi
+mprintf("The value of V is:%.2f\n",V)
+
+//from equation 8.15
+N=2*(1+int(V1)) //N is the total number of possible modes
+N=fpround(N,0)
+mprintf(" The Total number of possible modes is:%d",N)