Click or drag to resize

FitCurveFunc(Double, Double, FuncDouble, Double, Double, Double, Double, Int32) Method

Non-linear least-squares fitting the points (x,y) to an arbitrary function y : x -> f(p, 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> f,
	double initialGuess,
	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
The model function.
initialGuess  Double
The initial parameter guess.
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