User:Eelectricalp/sandbox

Tline:

r=100;

l=235e-9;

c=189e-12;

c1=50e-15;

c2=100e-15;

h=5e-3;

w=(2*pi*1e9);

j=sqrt(-1);

s=j*w;

rsource=50;

lsource=5e-9;

Th=sqrt((r+(s*l))*(s*c));

zo=sqrt((r+(s*l))/(s*c));

Tline=[cosh(Th*h) zo*sinh(Th*h);(sinh(Th*h)/zo) cosh(Th*h)];

series=[1 1/(s*c1);0 1];

shunt=[1 0;(s*c2) 1];

ABCD=Tline*shunt*series*shunt*Tline*shunt;

zinput= ABCD(1,1)/ABCD(2,1)

zthevin=ABCD(1,2)/ABCD(1,1)

capacitorvaluezinput=1/(s*zinput)

ZThevincapacitorvalue=1/(s*zthevin)

Zthevinductorvalue=imaginary/s