Click or drag to resize

FitCurve(Double, Double, FuncDouble, Double, Double, Double, Double, Double, Double, Double, Double, Int32) Method

Non-linear least-squares fitting the points (x,y) to an arbitrary function y : x -> f(p0, p1, p2, x), returning its best fitting parameter p0, p1 and p2.

Namespace: Altaxo.Calc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public static (double P0, double P1, double P2) Curve(
	double[] x,
	double[] y,
	Func<double, double, double, double, double> f,
	double initialGuess0,
	double initialGuess1,
	double initialGuess2,
	double tolerance = 1E-08,
	int maxIterations = 1000
)

Parameters

x  Double
The x values of the sample points.
y  Double
The y values of the sample points.
f  FuncDouble, Double, Double, Double, Double
The model function.
initialGuess0  Double
The initial guess for the first parameter.
initialGuess1  Double
The initial guess for the second parameter.
initialGuess2  Double
The initial guess for the third parameter.
tolerance  Double  (Optional)
The convergence tolerance.
maxIterations  Int32  (Optional)
The maximum number of iterations.

Return Value

ValueTupleDouble, Double, Double
The fitted parameter triple.
See Also