function [u,k,konvergHist] = RichardsonovaMetoda(A,b,omega,epsil)

n = length(b);
u = zeros(n,1);
k = 0;
r = b - A*u;
normr = norm(r);
normr0 = normr;
konvergHist(k+1) = normr/normr0;

while normr/normr0 > epsil
    u = u + omega*r;
    r = b - A*u;
    normr = norm(r);
    k = k+1;
    konvergHist(k+1) = normr/normr0;
end