Click or drag to resize

FitCurve(Double, Double, FuncDouble, Double, Double, Double, Double, 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, p3, p4, x), returning its best fitting parameter p0, p1, p2, p3 and p4.

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, double P3, double P4) Curve(
	double[] x,
	double[] y,
	Func<double, double, double, double, double, double, double> f,
	double initialGuess0,
	double initialGuess1,
	double initialGuess2,
	double initialGuess3,
	double initialGuess4,
	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, 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.
initialGuess3  Double
The initial guess for the fourth parameter.
initialGuess4  Double
The initial guess for the fifth parameter.
tolerance  Double  (Optional)
The convergence tolerance.
maxIterations  Int32  (Optional)
The maximum number of iterations.

Return Value

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