function [x Fv]=newtonsys(xo,Niter,tol)

  x=xo';
  for i=1:Niter
    
    delta=eye(length(xo),1);
    if (Ffun(x)== zeros(length(xo),1) | abs(max(delta))<=tol)
      disp("")
      disp ("The method completed successfully!")
      disp("")
      return;
    else
      Jv=Jfun(x);
      Fv=Ffun(x);
      delta=-Jv\Fv;
      x=x+delta;
    endif
  endfor
  disp("")
  disp ("The method failed after (Niter)")
  disp (Niter)
  disp ("iterations")
  disp("")

endfunction