CALL INV Routine
Calculates a matrix that is the inverse of the provided
input matrix that should be a square, non-singular matrix.
Category: |
Matrix Operations |
Requirement: |
Both the input and output matrices must be square and
have the same dimensions.
|
Syntax
Required Arguments
- X
-
specifies an input
matrix with dimensions m x m (that
is, X[m, m]).
- Y
-
specifies an output
matrix with dimensions m x m (that
is, Y[m, m]),
such that
and I is the identity
matrix.
Example
The following example
uses the INV 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 inv(mat1, result);
put result=;
quit;
Output from the INV CALL Routine
The SAS System 1
The FCMP Procedure
result[1, 1]=4.0460407887 result[1, 2]=1.6892917399 result[1, 3]=0.8661767509
result[2, 1]=-4.173108283 result[2, 2]=-1.092427483 result[2, 3]=-1.416802558
result[3, 1]=4.230288655 result[3, 2]=1.6571719011 result[3, 3]=1.6645841716