%Gauss Seidel

%startgissning
x=0.2;
y=-1+sqrt(1.6);
c=[x y]';
cold=c;
iter=0;
xnorm = 1;
format long
while xnorm>0.5*1e-7 & iter<10
    cold=c;
    x=(2*y-x^3)/10;
    y=(3-x-5*y^2)/10;
    c=[x y]';
    xnorm=norm(c-cold,inf);%största felet
    iter=iter+1;
end