Click or drag to resize

FitCurveFunc(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 a function y' for the best fitting curve.

Namespace: Altaxo.Calc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public static Func<double, double> CurveFunc(
	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

FuncDouble, Double
A function representing the fitted curve.
See Also