NLFitContext

 

Name

NLFitContext

Remark

The NLFitContext is derived from Analysis class and provide access to the information of the fitting function, as well as the current evaluation state that is generated by implementing the fitting function in Origin C. During non-linear fitting, the fitting function generally will return the corresponding y value for a particular x. However, when convolution and ODE (Ordinary Differential Equation) are involved, the entire curve should be considered, not only for a particular data point. NLFitContext class, which first introduced in Origin 8 SR2, can provide access to the key information with fitter.
For example, if we perform convolution while fitting, NLFitContext can help to monitor the fitted parameters in each iteration. Once they are updated, we can compute the convolution using the Fourier transform. The results can be saved in a defined vector. Then for each x, we can get the evaluated y from the vector with the current data index in NLSFCURRINFO.

Hierarchy

  • NLFitContext

Examples

EX1

Please refer to Fitting with Convolution as example.

EX2

Please refer to Fitting with an Ordinary Differential Equation as example.

EX3

Please refer to Fitting with Convolution of Two Functions as example.

Header to Include

ONLSF.h

Reference

Members

Name Brief Example
GetFitCurrInfo It provides the information about the current evaluation state. See NLSFCURRINFO for more info. Examples
GetIndepData It provides the information about the independent data being fitted. Examples
GetSourceDataRange It provides a way to access source XY DataRange. Examples
GetNumDatasetSets It provides the information about the number of dataset sets being fitted. Examples
IsNewParamValues Whenever evaluation of values of a fitting function are needed for a new set of parameter values, an internal flag 'new parameter values' is set. Examples
NLFitContext Constructor of the class.
~NLFitContext Destructor of the class.