CALL MULT Routine
Calculates the multiplicative product of two input
matrices.
Category: |
Matrix Operations |
Requirement: |
The number of columns for the first input matrix must
be the same as the number of rows for the second matrix.
|
Syntax
Required Arguments
- X
-
specifies an input
matrix with dimensions m x n (that
is, X[m, n]).
- Y
-
specifies an input
matrix with dimensions n x p (that
is, Y[n, p]).
- Z
-
specifies an output
matrix with dimensions m x p (that
is, Z[m, p]),
such that
Example
The following example
uses the MULT CALL routine:
options pageno=1 nodate;
proc fcmp;
array mat1[2,3] (0.3, -0.78, -0.82, 0.54, 1.74, 1.2);
array mat2[3,2] (1, 0, 0, 1, 1, 0);
array result[2,2];
call mult(mat1, mat2, result);
put result=;
quit;
Output from the MULT CALL Routine
The SAS System 1
The FCMP Procedure
result[1, 1]=-0.52 result[1, 2]=-0.78 result[2, 1]=1.74 result[2, 2]=1.74