Archived
1
0
This repository has been archived on 2026-02-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mdv-project/MATLAB/Cinematica/newtonsis2.m
T
2025-05-06 20:35:28 +02:00

16 lines
396 B
Objective-C
Executable File

function[xn,k,info,Jk] = newtonsis2(f1 ,f2 ,df11 ,df12 ,df21 ,df22 ,kmax ,tol ,xc)
info=0;
F0(1)= f1(xc) ; F0(2)= f2(xc);
Fk=F0 ;
for k=1:kmax
Jk(1,1)= df11(xc) ; Jk(1,2)= df12(xc) ; Jk(2,1)= df21(xc) ; Jk(2,2)= df22(xc);
xn=xc-(inv(Jk))*Fk' ;
Fk(1)= f1(xn) ; Fk(2)= f2 (xn);
if norm( xn -xc)< tol && norm(Fk)< tol
return
end
xc=xn;
end
info=1;
end