IMSL C# Numerical Library

NonlinLeastSquares.Solve Method 

Solve a nonlinear least-squares problem using a modified Levenberg-Marquardt algorithm and a Jacobian.

public double[] Solve(
   IFunction f
);

Parameters

f
User supplied NonlinLeastSquares.IFunction that defines the least-squares problem. If f implements IJacobian then its Jacobian is used. Otherwise, a finite difference Jacobian is used.

Return Value

A double array of length n containing the approximate solution.

Exceptions

Exception Type Condition
TooManyIterationsException is thrown if the number of iterations exceeds MaximumIterations, MaximumIterations is set to 100 by default

See Also

NonlinLeastSquares Class | Imsl.Math Namespace