blob: 6da7e824ccf7c0776abee0a4a489423f2051c075 (
plain)
1
2
3
4
5
6
7
8
9
|
//Example 7_7
clc();
clear;
//To calculate the fiber length
alpha=0.5 //units in db/KM
it=2*10^-6 //units in W
i0=1.5*10^-3 //units in W
l=-1*(10/alpha)*log10(it/i0) //units in KM
printf("The length of the fiber is L=%.1f KM",l)
|