CALL POWER Routine

Raises a square matrix to a given scalar value.
Category: Matrix Operations
Restriction: Large scalar values should be avoided because the POWER CALL routine's internal use of the matrix multiplication routine might cause numerical precision problems.
Requirement: Both input and output matrices must be square and have the same dimensions.

Syntax

CALL POWER(X, a, Y);

Required Arguments

X
specifies an input matrix with dimensions m x m (that is, X[m, m]).
a
specifies an integer scalar value (power).
Y
specifies an output matrix with dimensions m x m (that is, Y[m, m]), such that

Details

If the scalar is not an integer, it is truncated to an integer. If the scalar is less than 0, then it is changed to 0. See the SAS/IML User's Guide for more information.

Example

The following example uses the POWER CALL routine:
options pageno=1 nodate;

proc fcmp;
   array mat1[3,3] (0.3, -0.78, -0.82, 0.54, 1.74,
                    1.2, -1.3, 0.25, 1.49);
   array result[3,3];
   call power (mat1, 3, result);
   put result=;
quit;
Output from the POWER CALL Routine
                                The SAS System                               1

                              The FCMP Procedure

result[1, 1]=2.375432 result[1, 2]=-4.299482 result[1, 3]=-6.339638
result[2, 1]=-3.031224 result[2, 2]=6.272988 result[2, 3]=8.979036
result[3, 1]=-4.33592 result[3, 2]=5.775695 result[3, 3]=9.326529