blob: 734f1ddca58e4de77373f39f70c4a0d77053546b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//to find VSWR and max and min resistance
r=100;
c=1e-9;
f=2e6;
w=2*%pi*f;
zl=r/(1+(w*%i*r*c));//(r*(1/%i*w*c))/(r+(1/%i*w*c));
zo=50;
tl=(zl-zo)/(zl+zo);
Tl=abs(tl);
VSWR=(1+Tl)/(1-Tl);
disp('The VSWR = '+string(VSWR));
rmax=VSWR*zo;
rmin=zo/VSWR;
disp('maximum resistance on line is = '+string(rmax)+' kohm','minimum resistance on line is = '+string(rmin)+' kohm');
|