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

end
