Jump to content

Circuit Theory/Phasors/Examples/example14/phasor solution/code-mupad

From Wikibooks, open books for an open world
r1 := 1000; c1 := 0.0001; r3 := 2000; c2 := 0.0002;
L2 := 0.001; L1 := 0.001; r2 := 500;
w := 1000; v1 := 5*(sqrt(3) + I); i1 := (1-I)/(2*sqrt(2));
numeric::linsolve([ v2 = i2*r1,
i3 = c1*w*I*v3,
v9 = i6*r3,
v6 = L1*w*I*i2,
i4 = c2*w*I*v4,
v5 = L2*w*I*i5,
v7 = r2*i1,
v2+v3+v9+v6-v1 = 0,
v4 + v5 - v9 = 0,
v7 + v3 + v4 - v8 = 0,
i2 + i1 -i3 = 0,
i3 - i4 - i6 = 0,
i4 - i1 - i5 =0],
[i2,i3,i4,i5,i6,v2,v3,v4,v5,v6,v7,v8,v9])