Click or drag to resize

MathRoutinesLinearFitSolveFactors Method

LightningChart .NET Help
Calculate linear fit from given points. Makes best fit with Least Square regression method. A line equation is y = k*x + b, that is, y = gradient * x + coefficient

Namespace:  Arction.Wpf.Charting
Assembly:  Arction.Wpf.Charting.LightningChart (in Arction.Wpf.Charting.LightningChart.dll) Version: 10.3.1
Syntax
public static bool LinearFitSolveFactors(
	double[] x,
	double[] y,
	out double gradient,
	out double coefficient
)

Parameters

x
Type: SystemDouble
X values
y
Type: SystemDouble
Y values
gradient
Type: SystemDouble
Line gradient
coefficient
Type: SystemDouble
Coefficient, Y value of intersection where X = 0

Return Value

Type: Boolean
True if success
See Also