Vg=input('Enter the complex generator voltage '); Zg=input('Enter the complex generator impedance '); Zo=input('Enter the lossless t-line characteristic impedance '); l=input('Enter the lossless t-line length in wavelengths '); Zl=input('Enter the complex load impedance '); j=0+1j; betal=2*pi*l; Zin=Zo*(Zl+j*Zo*tan(betal))/(Zo+j*Zl*tan(betal)); gammal=(Zl-Zo)/(Zl+Zo); gamma0=gammal*exp(-j*2*betal); Ig=Vg/(Zg+Zin); Pg=0.5*Vg*conj(Ig); V0=Ig*Zin; P0=0.5*V0*conj(Ig); Vcoeff=V0/(1+gamma0); Vl=Vcoeff*exp(-j*betal)*(1+gammal); Il=Vcoeff*exp(-j*betal)*(1-gammal)/Zo; Pl=0.5*Vl*conj(Il); s=(1+abs(gammal))/(1-abs(gammal)); format compact Generator_voltage=Vg Generator_current=Ig Generator_power=Pg Generator_impedance_voltage=Vg-V0 Generator_impedance_current=Ig Generator_impedance_power=Pg-P0 T_line_input_voltage=V0 T_line_input_current=Ig T_line_input_power=P0 T_line_input_impedance=Zin T_line_input_reflection_coeff=gamma0 T_line_standing_wave_ratio=s Load_voltage=Vl Load_current=Il Load_power=Pl Load_reflection_coeff=gammal