summaryrefslogtreecommitdiff
path: root/3543/CH7/EX7.43/EX7_43.sce
blob: ef2770a1f2b71dcce943bb5c21b9c0b8d20bc616 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Example 7.42
// Calculation of a)excess loss,b)insertion loss,c)crosstalk and d)split ratio for the device.
// Page no 497

clc;
clear;
close;

//Given data
P1=100*10^-6;                 // Power launched in port 1
P2=0.005*10^-6;              // Power launched in port 2
P3=30*10^-6;                // Power launched in port 3 
P4=35*10^-6;              // Power launched in port 4

// a)Excess loss
E=10*log10(P1/(P3+P4)); 
// b)Insertion loss
I1=10*log10(P1/P3);
I2=10*log10(P1/P4);

//c)Crosstalk
C=10*log10(P2/P1);

//d)Split ratio
S=(P3/(P3+P4))*100;


//Displaying results in the command window            
printf("\n Excess loss(in dB) = %0.2f  ",E);
printf("\n Insertion loss(in dB) = %0.3f  ",I1);
printf("\n Insertion loss (in dB)= %0.2f  ",I2);
printf("\n Crosstalk (in dB)= %0.1f  ",C);
printf("\n Split ratio(in percentage) = %0.2f  ",S);
// The cross talk answer computation is wrong in the book