Object Reference > Chart2DData Object > Chart2DData Object Methods > EvaluatePolynomial Method (Chart2DData) |
EvaluatePolynomial Method (Chart2DData)
EvaluatePolynomial(double xvalue, Coefficients() As Double)
Returns the value of the polynomial given by the specified Coefficients for the given independent value.
Function EvaluatePolynomial(XValue As Double, Coefficents) As Double
The index of each element of the Coefficients array matches the power of the independent variable in the term of the polynomial.
For example, to evaluate the polynomial:
Y(X) = 4*X**2 + 3*X + 21 at X=5
Dim c(0 To 2) As Double
Dim xvalue As Double, yvalue as Double
c(0) = 21
c(1) = 3
c(2) = 4
x = 5
yvalue = Chart.ChartGroups(1).Data.EvaluatePolynomial(xvalue, c)
See Also