UncertainMeasurementSampleTFitToFunction Method

Fits the data to an arbitrary parameterized function.

Definition

Namespace: Meta.Numerics.Statistics
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public UncertainMeasurementFitResult FitToFunction(
	Func<double[], T, double> function,
	double[] start
)

Parameters

function  FuncDouble, T, Double
The fit function.
start  Double
An initial guess at the parameters.

Return Value

UncertainMeasurementFitResult
A fit result containing the best-fitting function parameters and a χ2 test of the quality of the fit.

Exceptions

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