FUNCTION REFERENCE

polyval

Evaluate a polynomial.

Evaluate a polynomial.

Syntax

y = polyval(p, x); y = polyval(p,x,[],mu)

p holds coefficients from the highest power down (1 to 4096 values). Uses Horner's method.

Example

polyval([1 2 3], 2)   % 11

Differences from MATLAB: Finite inputs, one output. For real double inputs, mu=[center scale] evaluates at (x-center)/scale; the scale must be finite and positive. Error estimates are unsupported. Complex p or x is evaluated by the same recurrence; a result with zero imaginary parts is real.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.