.Modelica_LinearSystems2.Math.Polynomial.numberOfRoots

Information

Syntax

result = Polynomial.numberOfRoots(p);

Description

Calculate number of roots of a polynomial p.

Example

import Modelica_LinearSystems2.Math.Polynomial;

x = Polynomial.x();
p1 = -6*x^2 + 4*x -3;

Polynomial.numberOfRoots(p1);
// = 2

See also

Polynomial.roots.

Interface

encapsulated function numberOfRoots
  import Modelica_LinearSystems2.Math.Polynomial;
  input Polynomial p "Polynomial";
  output Integer result "Number of roots of p";
end numberOfRoots;

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