.Modelica_LinearSystems2.Math.Polynomial.evaluate

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.

Interface

encapsulated function evaluate
  import Modelica_LinearSystems2.Math.Polynomial;
  input Polynomial p "Polynomial to be evaluated";
  input Real x "Abszissa value";
  output Real y "Value of polynomial at x";
end evaluate;

Generated at 2024-12-17T19:26:02Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos