functionnumberOfRoots

Determine number of roots of polynomial

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.

Inputs

TypeNameDefaultDescription
PolynomialpPolynomial

Outputs

TypeNameDefaultDescription
IntegerresultNumber of roots of p