function strid_obvod
R1=30;
R2=50; 
R3=20;
L=15e-3;
C=20e-6; 
f = 50;
w = 2*pi*f;
Uo=10*exp(j*30*pi/180);
% prima aplikace Kirchoffovych zakonu => 3 rovnice o 3 neznamych
%        -i1 +            i2 +             i3 = 0
%  R1*i1 + (R2+j*w*L)*i2                      = U0
%  R1*i1                 + (R3+1./(j*w*C))*i3 = 0
A=[ -1, 1, 1;R1,(R2+j*w*L),0;R1,0,(R3+1./(j*w*C))];
b=[0;Uo;Uo];
x=A\b;
Im=abs(x);
fi=angle(x)*180/pi;
fprintf('Proudy\n');
for n=1:length(x)
    fprintf(' i%d = %6.3f sin(wt %+6.2f°) A \n',n,Im(n),fi(n));
end
end