MtxIntDiff::NumericGradDifference Function

void NumericGradDifference(TRealFunction Fun, TVec *Pars, TVec *Consts, const DewArray<tObject *> &ObjConst, TVec *Grad);

Numerical gradient by numerical differentiation using the forward difference quotient.

#NameTypeDescription
1FunTRealFunctionReal function of several variables.
2ParsTVec *Function variables.
3ConstsTVec *Array of additional constants which can be used in math formula.
4ObjConstconst DewArray<tObject *> &Array of additional constants (pointers) which can be used in math formula.
5GradTVec *Returns calculated gradient. If needed, Grad Length and Complex properties are adjusted automatically.
Remarks:

Calculates the numerical gradient by numerical differentiation using the forward difference quotient. The NumericGradDifference procedure can be used with a very moderate ( >= 1.0e-4) precision requirement.

See Also: MtxIntDiff::NumericGradRichardson
Declared in Dew::Math::Units::MtxIntDiff · Dew.Math/Units.MtxIntDiff.h · Cross-compiler