summaryrefslogtreecommitdiff
path: root/608/CH44/EX44.14/44_14.sce
blob: 4a0ca40e9fc6bbe1f665208bcf5005da9e055e5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Problem 44.14: A long transmission line has a characteristic impedance of 500 - j40  ohm and is terminated in an impedance of (a) 500 + j40 ohm and (b) 600 + j20 ohm. Determine the magnitude of the reflection coefficient in each case.

//initializing the variables:
Zo = 500 - %i*40; // in ohm
ZR1 = 500 + %i*40; // in ohm
ZR2 = 600 + %i*20; // in ohm

//calculation:
//reflection coefficient
p1 = (Zo - ZR1)/(Zo + ZR1)
p2 = (Zo - ZR2)/(Zo + ZR2)
p1mag = (real(p1)^2 + imag(p1)^2)^0.5
p2mag = (real(p2)^2 + imag(p2)^2)^0.5

printf("\n\n Result \n\n")
printf("\n reflection coefficient (a)%.3f and (b)%.3f",p1mag, p2mag)