summaryrefslogtreecommitdiff
path: root/2210/CH2/EX2.7/2_7.sce
blob: bf64163cd02a6352c161bb1accfad0ca9882de92 (plain)
1
2
3
4
5
6
7
8
9
10
11
//Chapter 2, Problem 7
clc
Zl=80-%i*10                     //load impedance in complex form
Z0=50                           //characteristic impedance in ohm

//calculation of reflection coefficient
ref=(Zl-Z0)/(Zl+Z0)
ref_mag={(real(ref)^2)+(imag(ref)^2)}^0.5
ref_ang=atan(imag(ref)/real(ref))

printf("Reflection coefficient is given by \n magnitude = %.2f \n angle = %.2f degree",ref_mag,ref_ang*180/%pi)