No BSD License  

Highlights from
Nlsqbnd

from Nlsqbnd by Alain Barraud
Non linear Leasr Squares Solver with box constraints/

[f,J]=LSwood(x)
function [f,J]=LSwood(x)
c=10;d=sqrt(10);e=sqrt(90);
v=x(2)-x(1)*x(1);w=x(4)-x(3)*x(3);
f(1)=c*v;
f(2)=1-x(1);
f(3)=e*w;
f(4)=1-x(3);
f(5)=d*(x(2)+x(4)-2);
f(6)=(x(2)-x(4))/d;f=f(:);
J=[-20*x(1) c 0 0;
    -1  0 0 0;
    0 0 -2*e*x(3) e;
    0 0 -1 0;
    0 d 0 d;
    0 1/d 0 -1/d];
%%%%%%%%%%%%%%%%

Contact us at files@mathworks.com