summaryrefslogtreecommitdiff
path: root/3710/CH8/EX8.13/Ex8_13.sce
blob: eba00e017572c0a734c94518b95754d1101347bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Example 8.13, Page Number 399
//The Function fpround(dependency) is used to round a floating point number x to n decimal places
//Transmission loss from lateral misalignment
clc;

l=0.1 //where l=D/2a and occurs due to lateral misalignment where D is the lateral displacement and a is the fiber core radius

//From equation 8.40
T=(2/%pi)*(acos(l)-l*(sqrt(1-(l**2))))
L=-10*log10(T) //L is the Transmission loss in dB
L=fpround(L,2)
mprintf("The Total Transmission loss is %.2f dB\n",L)

//Including Fresnel loss from the previous example
LT=L+0.33
mprintf(" The Total Transmission loss including Fresnel loss is %.2f dB",LT)