You are here: Symbol Reference > MtxVec Namespace > Classes > TMtx Class > public > TMtx.PowerMtx Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtx.PowerMtx Method

Raises matrix elements to any power.

Pascal
function PowerMtx(const Base: TMtx; const Exponent: TMtx): TMtx; overload;

Raises Base matrix elements to the Exponent matrix elements power and stores the results in the calling matrix. The Rows, Cols and TMtxVec.ComplexComplexproperties of the calling matrix are adjusted automatically. The Rows, Cols and TMtxVec.ComplexComplexproperties of Base and Exponent matrices must match otherwise an exception is raised.

Only positive exponents can be handled if Exponent matrix is not complex.

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.Power(A,B); 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!