Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- F=@(x)[x(1)^2+4*x(2)^2-4; 4*x(1)^2+x(2)^2-4];
- DF=@(x)[2*x(1),8*x(2);8*x(1),2*x(2)];
- disp(newton(F, DF, [1; 1], 10))
- function x = newton(F,DF,x0,k)
- x = x0;
- for i=1:k
- x = x - (DF(x))^-1*F(x);
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement