Summary
Matrix array multiplication.
Class
TMtx
Declaration
Function MulElem(MTx1, Mtx2: TMtx): TMtx;
Description
Multiplies elements in Mtx1 matrix with the elements in Mtx2 matrix (array multiplication) and stores the results in calling matrix. The
Rows,
Cols and
Complex properties of calling matrix are set implicitly to match those of Mtx1 and Mtx2 matrices. Mtx1 and Mtx2 Rows, Cols, and Complex properties must be the same, otherwise an excetion is raised. raised.
Declaration
Function MulElem(MTx: TMtx): TMtx;
Description
Multiplies elements in Mtx matrix with the elements in the calling matrix (array multiplication) and stores the results in calling matrix. The
Rows,
Cols and
Complex properties of both matrices must match, otherwise an exception is raised.
Example 1
var A,B,C: TMtx;
begin
CreateIt(A,B,C);
try
A.SetIt(2,2,False,[1,2,
2,4]);
B.SetIt(2,2,False,[1,2,
2,4]);
C.MulElem(A,B);
// C becomes:
// [1, 4,
// 4,16]
finally
FreeIt(A,B,C);
end;
end;
| Copyright 2008 Dew Research |
http://www.dewresearch.com