summaryrefslogtreecommitdiff
path: root/3710/CH8/EX8.4/Ex8_4.sce
blob: d7686abca583c1ea337928acab93d7de7177aa9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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