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: 4.1.4
Syntax
public UncertainMeasurementFitResult 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: UncertainMeasurementFitResult
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