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.ChartingMVVM
Assembly:
Arction.Wpf.ChartingMVVM.LightningChart (in Arction.Wpf.ChartingMVVM.LightningChart.dll) Version: 10.3.1
Syntaxpublic static bool LinearFitSolveFactors(
double[] x,
double[] y,
out double gradient,
out double coefficient
)
Public Shared Function LinearFitSolveFactors (
x As Double(),
y As Double(),
<OutAttribute> ByRef gradient As Double,
<OutAttribute> ByRef coefficient As Double
) As Boolean
public:
static bool LinearFitSolveFactors(
array<double>^ x,
array<double>^ y,
[OutAttribute] double% gradient,
[OutAttribute] 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:
BooleanTrue if success
See Also