function [ x ] = Jacobi( A,b,x0,n )
x=x0;  % only for n = 0
for i = 1:n
    x(1) = 1/A(1,1) * (b(1) -                A(1,2)*x0(2) - A(1,3)*x0(3));
    x(2) = 1/A(2,2) * (b(2) - A(2,1)*x0(1) -                A(2,3)*x0(3));
    x(3) = 1/A(3,3) * (b(3) - A(3,1)*x0(1) - A(3,2)*x0(2)               );
    x0=x;
end

end
