Language Reference |
raises a matrix to a power
The matrix power operator (**) creates a new matrix that is matrix multiplied by itself scalar times. Matrix must be square; scalar must be an integer greater than or equal to -1. Large scalar values cause numerical precision problems. If the scalar is not an integer, it is truncated to an integer.
For example, the following statements produce the matrix , as shown:
a={1 2, 1 1}; c=a**2;
C 2 rows 2 cols (numeric) 3 4 2 3If the matrix is symmetric, it is preferable to power its eigenvalues rather than use the matrix power operator directly on the matrix (see the description of the EIGEN call). Note that the expression
A**(-1) |
is permitted and is equivalent to INV(A)
.
The matrix power operator does not support missing values.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.