MATLAB Function Reference Previous page   Next Page
polyvalm

Matrix polynomial evaluation

Syntax

Description

Y = polyvalm(p,X) evaluates a polynomial in a matrix sense. This is the same as substituting matrix X in the polynomial p.

Polynomial p is a vector whose elements are the coefficients of a polynomial in descending powers, and X must be a square matrix.

Examples

The Pascal matrices are formed from Pascal's triangle of binomial coefficients. Here is the Pascal matrix of order 4.

Its characteristic polynomial can be generated with the poly function.

This represents the polynomial .

Pascal matrices have the curious property that the vector of coefficients of the characteristic polynomial is palindromic; it is the same forward and backward.

Evaluating this polynomial at each element is not very interesting.

But evaluating it in a matrix sense is interesting.

The result is the zero matrix. This is an instance of the Cayley-Hamilton theorem: a matrix satisfies its own characteristic equation.

See Also

polyfit, polyval


Previous page  polyval pow2 Next page

© 1994-2005 The MathWorks, Inc.