4.13. Evaluation of Polynomials with Matrix Arguments

The polynomial can also be evaluated for a square matrix s. In this case, the polynomial p(s) = s2 + 3s − 7 becomes p(S) = S2 + 3S − 7I, where I is the identity square matrix, S is square matrix.

This polynomial can be solved using the following command:

Z = polyvalm(a,S)

where

a is a row vector whose elements are the coefficients of the matrix polynomial to be evaluated

S specifies the square matrix.

Example 4.20.

Evaluate the matrix polynomial X2 + X + 2, given that the square matrix X is

Solution:

The commands used are:

A = [1  1  2];
X = [2  3;  4  5];
Z = polyvalm(A, X)

The resultant matrix ...

Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.