summaryrefslogtreecommitdiff
path: root/1619/CH2/EX2.2.1/Example2_2_1.sce
blob: 93adc6463169f73d8ca48977e851142ac1407ce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Example 2.2.1 page 2.4

clc;
clear;

alpha= 3;   // average loss     Power decreases by 50% so P(0)/P(z)= 0.5
lamda= 900*10^-9;   //wavelength
z= 10*log10(0.5)/alpha;   //z is the length
z= z*-1;
printf("The length over which power decreases by 50%% is =%.2f Kms",z);

z1= 10*log10(0.25)/alpha;     //Power decreases by 75% so P(0)/P(z)= 0.25
z1=z1*-1;   //as distance cannot be negative...
printf("\n\nThe length over which power decreases by 75%% is =%.2f Kms",z1);