lsqfun must calculate the vector of values fix and Jacobian matrix of first derivatives fixj at any point x. (However, if you do not wish to calculate the residuals or first derivatives at a particular x, there is the option of setting a parameter to cause e04gd to terminate immediately.)

Syntax

C#
public delegate void E04GD_LSQFUN(
	ref int iflag,
	int m,
	int n,
	double[] xc,
	double[] fvec,
	double[,] fjac
)
Visual Basic
Public Delegate Sub E04GD_LSQFUN ( _
	ByRef iflag As Integer, _
	m As Integer, _
	n As Integer, _
	xc As Double(), _
	fvec As Double(), _
	fjac As Double(,) _
)
Visual C++
public delegate void E04GD_LSQFUN(
	int% iflag, 
	int m, 
	int n, 
	array<double>^ xc, 
	array<double>^ fvec, 
	array<double,2>^ fjac
)
F#
type E04GD_LSQFUN = 
    delegate of 
        iflag : int byref * 
        m : int * 
        n : int * 
        xc : float[] * 
        fvec : float[] * 
        fjac : float[,] -> unit

Parameters

iflag
Type: System..::..Int32%
On entry: to lsqfun, iflag will be set to 1 or 2.
iflag=1
Indicates that only the Jacobian matrix needs to be evaluated
iflag=2
Indicates that both the residuals and the Jacobian matrix must be calculated
On exit: if it is not possible to evaluate the fix or their first derivatives at the point given in xc (or if it wished to stop the calculations for any other reason), you should reset iflag to some negative number and return control to e04gd. e04gd will then terminate immediately, with ifail set to your setting of iflag.
m
Type: System..::..Int32
On entry: m, the numbers of residuals.
n
Type: System..::..Int32
On entry: n, the numbers of variables.
xc
Type: array<System..::..Double>[]()[][]
On entry: the point x at which the values of the fi and the fixj are required.
fvec
Type: array<System..::..Double>[]()[][]
On exit: unless iflag=1 on entry, or iflag is reset to a negative number, then fvec[i-1] must contain the value of fi at the point x, for i=1,2,,m.
fjac
Type: array<System..::..Double,2>[,](,)[,][,]
On exit: unless iflag is reset to a negative number, fjac[i-1,j-1] must contain the value of fixj at the point x, for i=1,2,,m and j=1,2,,n.

See Also