functionplot

Plot polynomial y=p(x)

Information

Syntax

Polynomial.plot(
  p, nPoints, autoLabel, xLabel, yLabel, autoRange, x_min, x_max);

Description

Plot the given polynomial. If default arguments are used, as in:

import Modelica_LinearSystems2.Math.Polynomial;

p = Polynomial({1,2,3});
Polynomial.plot(p);

then the abszissa range is determined in such a way that all roots (i.e., p(x) = 0) and all extrema (i.e, dp(x) = ∂p/∂x = 0) are in the plotted range. As default legend, the String representation of the polynomial is used as generated by operator-'String' function (called by String(p)).

Inputs

TypeNameDefaultDescription
PolynomialpPolynomial to be plotted
IntegernPoints200Number of points
BooleanautoLabeltrueTrue, if automatically selected labels
StringxLabel""Abszissa description, if autoLabel = false
StringyLabel""Ordinate description, if autoLabel = false
BooleanautoRangetrueTrue, if abszissa range is automatically determined
Realx_min-1.0Minimum abszissa value, if autoRange = false
Realx_max1.0Maximum abszissa value, if autoRange = false