summaryrefslogtreecommitdiff
path: root/728/CH3/EX3.5/Ex3_5.sce
blob: 75613a3cad1e2f58a97c9e471200dc5b417e4a8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Caption:Calculate VSWR & reflection coefficient.
//Exa: 3.5
clc;
clear;
close;
Z_o=50;//in ohms
f=300*10^6;//in Hz
Z_l=50+%i*50;//in ohms
wl=(3*10^8)/f;//wavelength(in meters)
P=[(Z_l-Z_o)/(Z_l+Z_o)];
P_mag={(real(P)^2)+(imag(P)^2)}^0.5;
P_ang=atan(imag(P)/real(P))*180/%pi;//in degrees
S={1+P_mag}/{1-P_mag};
disp(P,"Reflection coefficient =");
disp(P_mag,"Magnitude of reflection coeffcient =");
disp(P_ang,"Angle (in degree) =");
disp(S,"VSWR =");