blob: 1325273a54b7f421586df304c2acda1860ec3523 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//clear//
//Caption:Program to Find Attenuation in dB/km
//Example3.1
//page 91
clear;
clc;
z = [1 2]; //diatances are in kilometer
alpha_in_dB_per_km = 3;
r = (alpha_in_dB_per_km*z)/10;
P0_Pz = (10^r);
for i = 1:length(P0_Pz)
Pz_P0(i) = 1-(1/P0_Pz(i)) ;
end
disp(Pz_P0*100,'Optical signal power decreased by in percentage')
//RESULT
//Optical signal power decreased by in percentage
// 49.881277
// 74.881136
|