You are here: Symbol Reference > MtxExprInt Namespace > Classes > MatrixInt Record > public > MulElem Method > MatrixInt.MulElem Method (TMtxInt)
MtxVec VCL
ContentsIndex
PreviousUpNext
MatrixInt.MulElem Method (TMtxInt)

Matrix array multiplication.

Pascal
function MulElem(const Mtx: TMtxInt): TMtxInt; 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 IntPrecision properties of both matrices must match, otherwise an exception is raised.

var A,B,C: TMtxInt; begin CreateIt(A,B,C); try A.SetIt(2,2,[1,2, 2,4]); B.SetIt(2,2,[1,2, 2,4]); C.MulElem(A,B); // C becomes: // [1, 4, // 4,16] finally FreeIt(A,B,C); end; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!