function stejnosmerny_obv
R1=5;
R2=6;
R3=9;
R4=8;
U0=10;
% prima aplikace Kirchoffovych zakonu => 3 rovnice o 3 neznamych
%    I1 -    I2 -    I3 = 0
% R1*I1         + R3*I3 = U0
%    (R2+R4)*I2 - R3*I3 = 0
A=[1,-1,-1;R1,0,R3;0,R2+R4,-R3]; % matice koeficientu soustavy
b=[0;U0;0]; % vektor pravych stran
x=A\b;
for n=1:length(x)
    fprintf('I%d = %.3f\n',n,x(n));
end
end