horner

horner – polynomial evaluation

Calling sequence

  R=horner(P,Q, vdim=%f, ttmode=%f)

Parameters

Description

For a polynomial matrix P returns P(Q). The evaluation is performed using the Horner algorithm. When Q is a numerical matrix the Horner algorithm is a builtin function and when Q is a polynomial matrix the computation is performed with a library nsp function.

When ttmode is false the returned value is a cell matrix

When ttmode is true then the operation is a term to term horner which implies that both matrices have same dimensions (with the usual convention that 1x1 matrices are promoted to any dimensions). The returned result is then a polynomial matrix.

Examples