F=@(z) [z(1)^2+2*z(2)-8,z(1)+z(2)^2-z(2)-3];
x=-3.5;
y=-2;
Gtuletis=[0,-1/sqrt(8-2*y);-1/sqrt(3-x+y),1/sqrt(3-x+y)];
norm(Gtuletis,1)
x=-1.6;
y=2.6;
Gtuletis=[0,-1/sqrt(8-2*y);-1/sqrt(3-x+y),1/sqrt(3-x+y)];
norm(Gtuletis,1)
x=2.2;
y=1.5;
Gtuletis=[0,-1/sqrt(8-2*y);-1/sqrt(3-x+y),1/sqrt(3-x+y)];
norm(Gtuletis,1)
x=2.8;
y=-0.1;
Gtuletis=[0,-1/sqrt(8-2*y);-1/sqrt(3-x+y),1/sqrt(3-x+y)];
norm(Gtuletis,1)
z=[-3.5,-2]; % alglähend reavektorina
i=0;
while norm(F(z),1)>10^(-6)
   z(1)=-sqrt(8-2*z(2));
   z(2)=-sqrt(3-z(1)+z(2));
   i=i+1;
end
lahend1=z
sammud1=i
z=[-1.6,2.6]; % alglähend reavektorina
i=0;
while norm(F(z),1)>10^(-6)
   z(1)=-sqrt(8-2*z(2));
   z(2)=sqrt(3-z(1)+z(2));
   i=i+1;
end
lahend2=z
sammud2=i