# LMFnlsq 1.0

OS : Windows / Linux / Mac OS / BSD / Solaris

Script Licensing : BSD - BSD License

Created : Jan 8, 2010

Downloads : 11

Thank you for voting...

## The function LMFnlsq.m is used for finding optimal ...

The function LMFnlsq by Miroslav Balda. m is used for finding optimal solution of an overdetermined system of nonlinear equations in the least-squares sense.

The standard Levenberg-Marquardt algorithm was modified by Fletcher and coded in FORTRAN many years ago (see the Reference).

This version of lmfnlsq 1.0 is a complete MATLAB implementation complemented by setting parameters of iterations as options.

This part of the code has been strongly influenced by Duane Hanselman's function mmfsolve. m.

x = LMFnlsq - 0MB(Eqns, X0);

x = LMFnlsq 1.0(Eqns, X0);

x = LMFnlsq(Eqns, X0);

x = LMFnlsq(Eqns, X0, 'Name', Value, . . . );

x = LMFnlsq(Eqns, X0, Options);

[x, ssq] = LMFnlsq(Eqns, . . . );

[x, ssq, cnt] = LMFnlsq(Eqns, . . . );

[x, ssq, cnt, nfJ] = LMFnlsq(Eqns, . . . );

[x, ssq, cnt, nfJ, XY] = LMFnlsq(Eqns, . . . );

In all cases,

% X0 is a vector of initial estimates of solutions,

% x is the least-squares solution,

% ssq is sum of squares of equation residuals,

% cnt is a number of iteration,

% nfJ is a sum of calls of Eqns and function for jacobian matrix,

% xy is a matrix of iteration results for 2D problem [x(1), x(2)].

% Options is a list of Name-Value pairs, which may be set by the calls

Options = LMFnlsq; % for default values,

Options = LMFnlsq('Name', Value, . . . ); % for users' chosen parameters,

Options = LMFnlsq(Options, 'Name', Value, . . . ); % for updating Options.

If no Options is defined, default values of options are used.

% 'MaxIter' for setting maximum number of iterations,

% 'ScaleD' for defining diagonal matrix of scales,

% 'FunTol' for tolerance of final function values,

% 'XTol' for tolerance of final solution increments,

% 'Trace' for control of iteration saving,

% 'Lambda' for setting of initial value of the parameter lambda.

% 'Jacobian' for a handle of function, which evaluates Jacobian matrix.

If no handle is declared, internal function for finite difference approximation of the matrix is used.

• MATLAB functions inp, fig and separator

The standard Levenberg-Marquardt algorithm was modified by Fletcher and coded in FORTRAN many years ago (see the Reference).

This version of lmfnlsq 1.0 is a complete MATLAB implementation complemented by setting parameters of iterations as options.

This part of the code has been strongly influenced by Duane Hanselman's function mmfsolve. m.

**Calling of the function is rather simple and is one of the following:**

LMFnlsq [lmfnlsq1.0.exe] % for help outputx = LMFnlsq - 0MB(Eqns, X0);

x = LMFnlsq 1.0(Eqns, X0);

x = LMFnlsq(Eqns, X0);

x = LMFnlsq(Eqns, X0, 'Name', Value, . . . );

x = LMFnlsq(Eqns, X0, Options);

[x, ssq] = LMFnlsq(Eqns, . . . );

[x, ssq, cnt] = LMFnlsq(Eqns, . . . );

[x, ssq, cnt, nfJ] = LMFnlsq(Eqns, . . . );

[x, ssq, cnt, nfJ, XY] = LMFnlsq(Eqns, . . . );

In all cases,

**the applied variables have the following meaning:**

% Eqns is a function name or a handle defining a set of equations,% X0 is a vector of initial estimates of solutions,

% x is the least-squares solution,

% ssq is sum of squares of equation residuals,

% cnt is a number of iteration,

% nfJ is a sum of calls of Eqns and function for jacobian matrix,

% xy is a matrix of iteration results for 2D problem [x(1), x(2)].

% Options is a list of Name-Value pairs, which may be set by the calls

Options = LMFnlsq; % for default values,

Options = LMFnlsq('Name', Value, . . . ); % for users' chosen parameters,

Options = LMFnlsq(Options, 'Name', Value, . . . ); % for updating Options.

If no Options is defined, default values of options are used.

**Field names 'Name' of the structure Options are:**

% 'Display' for control of iteration results,% 'MaxIter' for setting maximum number of iterations,

% 'ScaleD' for defining diagonal matrix of scales,

% 'FunTol' for tolerance of final function values,

% 'XTol' for tolerance of final solution increments,

% 'Trace' for control of iteration saving,

% 'Lambda' for setting of initial value of the parameter lambda.

% 'Jacobian' for a handle of function, which evaluates Jacobian matrix.

If no handle is declared, internal function for finite difference approximation of the matrix is used.

**• matlab 7. 3 or higher**

**Demands:**• MATLAB functions inp, fig and separator

**LMFnlsq 1.0 scripting tags:**handle, math tool, matrix, iteration, function, solve equation, non-linear, jacobian, matlab, lmfnlsq, lmfnlsqeqns.

**What is new in LMFnlsq 1.0 software script?**- Unable to find LMFnlsq 1.0 news.

**What is improvements are expecting?**Newly-made LMFnlsq 1.1 will be downloaded from here. You may download directly. Please write the reviews of the LMFnlsq. License limitations are unspecified.