clear; clc; v=11e3/sqrt(3); r=25e6; x1=.25*%i; x2=.35*%i; x0=.1*%i; xn=0; e=1; ia1=e/(x1+(x0*x2/(x0+x2))); va1=e-(ia1*x1); va2=va1; va0=va2; ia2=-va2/x2; ia0=-va0/x0; a=1*%e^(%i*(120*%pi/180)); b=a^2; ia=(ia0+ia1+ia2); ib=(ia0+(b*ia1)+(a*ia2)); ic=(ia0+(a*ia1)+(b*ia2)); in=3*ia0; va=3*va1; vb=0; vc=vb; vab=va; vbc=vb-vc; vca=-va; vab=v*vab; vca=v*vca; i=r/(3*v); ia0r=real(ia); ia0i=imag(ia); iam=sqrt((ia0r^2)+(ia0i^2)); ia1r=real(ib); ia1i=imag(ib); ibm=sqrt((ia1r^2)+(ia1i^2)); ia2r=real(ic); ia2i=imag(ic); icm=sqrt((ia2r^2)+(ia2i^2)); ic=icm*i; ib=ibm*i; ia=iam*i; ib=round(ib/01e2)*1e2; ic=round(ic/01e2)*1e2; in=in*i*%i; mprintf("the line voltages are\nvab=%fV \t vbc=%fkV \t vca=%f/_180kV\nthe line currents are\nia=%fA \t ib=%dA \t ic=%dA \t in=%dA",vab/1e3,vbc/1e3,-vca/1e3,ia,-ib,ic,-real(in));