National Instruments 320682C Musical Toy Instrument User Manual


 
Chapter 3 Analysis Library
© National Instruments Corporation 3-23 LabWindows/CVI Standard Libraries
MatrixMul
int
status
=
MatrixMul
(void *
matrixX
, void *
matrixY
, int
#ofRowsInX
,
int
cols/rowsInX/Y
, int
#ofColumnsInY
,
void *
outputMatrix
);
Purpose
Multiplies two 2D input matrices. The function obtains the (ith, jth) element of the output matrix
by using the following formula.
zxy
ij ip pj
p
k
,,,
=∗
=
0
1
Parameters
Input
matrixX
double-precision 2D
array
matrixX
input matrix.
matrixY
double-precision 2D
array
matrixY
input matrix.
#ofRowsInX
integer
First dimension of
matrixX
.
cols/rowsInX/Y
integer
Second dimension of
matrixX
.;
first dimension of
matrixY
.
#ofColumnsInY
integer
Second dimension of
matrixY
.
Output
outputMatrix
double-precision 2D
array
Output matrix.
Return Value
status
integer Refer to error codes in
Table 3-2.
Parameter Discussion
Note:
Be sure to use the correct array sizes. The following array sizes must be met:
matrixX
must be (
#ofRowsInX
by
cols/rowsInX/Y
).
matrixY
must
be (
cols/rowsInX/Y
by
#ofColumnsInY
).
outputMatrix
must be (
#ofRowsInX
by
#ofColumnsInY
).