summaryrefslogtreecommitdiff
path: root/2825/CH14/EX14.15/Ex14_15.sce
blob: aadd0c297fe97fe35bebda618b07219f181fae07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//Ex14_15 Pg-701
clc

alpha=3.5 //loss in fiber
Pi=0.5//input power in milli watt
L=4 //length of fiber in km

disp("The attenuation of an optical fiber is given by")
disp("             alpha = (10/L)*log(Pi/Po)")

Po=Pi/(10^(alpha*L/10))
printf("\n Output power = %.2f mW",Po*1e3)