image thumbnail
from LMFnlsq - Solution of nonlinear least squares by Miroslav Balda
Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations

res(p)
function dq = res(p)
%%%%%%%%%%%%%%%%%%%%%

global x y p0

p = p.*p0;
dq = p(1)*(1-exp(-p(2)*x)) - y;

Contact us at files@mathworks.com