a = exp(1j*2*pi/3);
E = 230;
R = 10;
Zs = 1j*10;
Zm = 1j*5;

disp('a)');
Eabc = E *[1; a^2; a];
Zabc = [Zs Zm Zm
        Zm Zs Zm
        Zm Zm Zs];
Rabc = diag([R 1e8 1e8]);
Iabc = (Zabc + Rabc)\Eabc
Uabc = Rabc*Iabc

disp('b)');
Zd = Zs - Zm;
Zi = Zs - Zm;
Zo = Zs + 2*Zm;
Ia = 3*E/(3*R + Zd + Zi + Zo)
Ud = E - Zd*Ia/3
Ui = -Zi*Ia/3
Uo = -Zo*Ia/3
Ua = Ud + Ui + Uo
Ub = a^2*Ud + a*Ui + Uo
Uc = a*Ud + a^2*Ui + Uo
