Click or drag to resize

FitPolynomialWeighted Method

Weighted Least-Squares fitting the points (x,y) and weights w to a k-order polynomial y : x -> p0 + p1*x + p2*x^2 + ... + pk*x^k, returning its best fitting parameters as [p0, p1, p2, ..., pk] array, compatible with Polynomial.Evaluate. A polynomial with order/degree k has (k+1) coefficients and thus requires at least (k+1) samples.

Namespace: Altaxo.Calc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static double[] PolynomialWeighted(
	double[] x,
	double[] y,
	double[] w,
	int order
)

Parameters

x  Double

[Missing <param name="x"/> documentation for "M:Altaxo.Calc.Fit.PolynomialWeighted(System.Double[],System.Double[],System.Double[],System.Int32)"]

y  Double

[Missing <param name="y"/> documentation for "M:Altaxo.Calc.Fit.PolynomialWeighted(System.Double[],System.Double[],System.Double[],System.Int32)"]

w  Double

[Missing <param name="w"/> documentation for "M:Altaxo.Calc.Fit.PolynomialWeighted(System.Double[],System.Double[],System.Double[],System.Int32)"]

order  Int32

[Missing <param name="order"/> documentation for "M:Altaxo.Calc.Fit.PolynomialWeighted(System.Double[],System.Double[],System.Double[],System.Int32)"]

Return Value

Double

[Missing <returns> documentation for "M:Altaxo.Calc.Fit.PolynomialWeighted(System.Double[],System.Double[],System.Double[],System.Int32)"]

See Also