summaryrefslogtreecommitdiff
path: root/848/CH3/EX3.2/Example3_2.sce
blob: bfb8a1d2cd36da33d87ea0b4fa29efc3c363d74a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//clear//
//Caption: To Calculate input and output power in dBm
//Example3.2
//page 91
clear;
close;
clc;
Pin = 200e-06; //power launched into the fiber
alpha = 0.4; //attenuation in dB per KM
z = 30;  //optical fiber length 30 KM
Pin_dBm = 10*log10(Pin/1e-03);
Pout_dBm = 10*log10(Pin/1e-03)-alpha*z;
Pout = 10^(Pout_dBm/10)
disp(Pin_dBm,'Pin_dBm')
disp(Pout_dBm,'Pout_dBm')
disp(Pout*1e-03,'Output power in watts')
//Result
//Pin_dBm =   - 6.9897  
//Pout_dBm =     - 18.9897
//Output power in watts  =  0.0000126