Advertisement
napalmstickstokids

the fug

Jul 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. Jac=@(x)[2*x(1),2*x(1),1;2*x(2),2*x(2),1;2*x(3),-1,1];
  2. Fn=@(x)[x(1)^2+x(2)^2+x(3)^2-9;x(1)^2+x(2)^2-x(3)-1;x(1)+x(2)+x(3)-3];
  3. x=[-1;20;101];
  4. while 1
  5. dx=Jac(x)\Fn(x);
  6. if sum(abs(dx))<10e-5
  7. break
  8. end
  9. x=x+dx;
  10. end
  11. jacans=x;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement