functionevaluate
Evaluate a polynomial at a given Real abszissa value
Information
Syntax
y = Polynomial.evaluate(p, x);
Description
Evaluate a polynomial p at a given
Real abszissa value x.
Note
For this function, functions for the first and second derivatives are provided, so that the function can be seamlessly used e.g. in mechanical models.
Example
import Modelica_LinearSystems2.Math.Polynomial; x = Polynomial.x(); p1 = -6*x^2 + 4*x -3; Polynomial.evaluate(p1, 1); // = -5.0
See also
Polynomial.derivativeValue, Polynomial.integralValue, Polynomial.evaluateComplex.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Polynomial | p | Polynomial to be evaluated | |
| Real | x | Abszissa value |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | y | Value of polynomial at x |