You are here: Symbol Reference > MtxExpr Namespace > Classes > Matrix Record > public > MulElem Method > Matrix.MulElem Method (TMtx)
MtxVec VCL
ContentsIndex
PreviousUpNext
Matrix.MulElem Method (TMtx)

Matrix array multiplication.

Pascal
function MulElem(const Mtx: TMtx): TMtx; overload;

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.

var A,B,C: Matrix; begin 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] end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!