Click or drag to resize
UncertainMeasurementSampleTFitToFunction Method
Fits the data to an arbitrary parameterized function.

Namespace:  Meta.Numerics.Statistics
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 3.1.0.0 (3.1.0.0)
Syntax
public FitResult FitToFunction(
	Func<double[], T, double> function,
	double[] start
)

Parameters

function
Type: SystemFuncDouble, T, Double
The fit function.
start
Type: SystemDouble
An initial guess at the parameters.

Return Value

Type: FitResult
A fit result containing the best-fitting function parameters and a χ2 test of the quality of the fit.
Exceptions
ExceptionCondition
ArgumentNullExceptionfunction or start are .
InsufficientDataExceptionThere are fewer data points than fit parameters.
DivideByZeroExceptionThe curvature matrix is singular, indicating that the data is independent of one or more parameters, or that two or more parameters are linearly dependent.
See Also