summaryrefslogtreecommitdiff
path: root/728/CH3/EX3.5/Ex3_5.txt
diff options
context:
space:
mode:
Diffstat (limited to '728/CH3/EX3.5/Ex3_5.txt')
-rwxr-xr-x728/CH3/EX3.5/Ex3_5.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/728/CH3/EX3.5/Ex3_5.txt b/728/CH3/EX3.5/Ex3_5.txt
new file mode 100755
index 000000000..b822a5976
--- /dev/null
+++ b/728/CH3/EX3.5/Ex3_5.txt
@@ -0,0 +1,20 @@
+//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 =");
+
+
+