## How do I calculate the numerical Jacobian for a set of six non linear equations ?

on 6 Jul 2019
Latest activity Commented on by Matt J

on 7 Jul 2019

### Matt J (view profile)

Hi All
how do I calculate the Jacobian matrix for the following equations based on the example I put afterwards ?
F(1) = (x(1) - h1 )^2 + (x(2)- v1 )^2 + (x(3)-w1)^2 - A(1)^2;
F(2) = (x(1) - h2 )^2 + (x(2)- v2 )^2 + (x(3)-w2)^2 - A(2)^2;
F(3)= (x(1)-x(2))^2 + (x(2)-x(3))^2 + (x(3)-w3)^2 - A(3)^2;
x is the varaible to solve
% Example: (nonlinear least squares)
% xdata = (0:.1:1)';
% ydata = 1+2*exp(0.75*xdata);
% fun = @(c) ((c(1)+c(2)*exp(c(3)*xdata)) - ydata).^2;
%
% [jac,err] = jacobianest(fun,[1 1 1])
My problem : in the example only the coeficients have been differentiated. in my equations , x should be differentiated

Show 1 older comment
Star Strider

### Star Strider (view profile)

on 6 Jul 2019

on 7 Jul 2019
Star : why have you linked this question to another of mine ?
Matt : does not matter , your answer was great enoough. I got it
Matt J

### Matt J (view profile)

on 7 Jul 2019
No, it doesn't matter. Just a remark.

on 6 Jul 2019
Edited by Matt J

on 6 Jul 2019