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

Compute matrix function as a function of another matrix.

Pascal
function MtxFunction(const Src: TMtx; const Params: array of TCplx; Func: TMtxFunction = nil; SourceType: TMtxType = mtGeneral): TMtx; overload;

The method allows you to compute any function as a function of the Src matrix. For example, a square of root of the matrix would not compute the square root of the elements of the matrix, but instead, the result would be such, that the product of two resulting matrices would return the original matrix. The Params parameters allow you to specify aditional parameter for the Func function. 

Because the method is based on the eigenvalue decomposition and the eigenvalue, the SourceType for symmetric and symmetric positive definite matrices has to be defined explicitly.

The MtxPower function declaration:

function TMtx.MtxPower(const Src: TMtx; Exponent: TCplx; SourceType: TMtxType = mtGeneral): TMtx; begin result := MtxFunction(Src,[Exponent],@DoToPower,SourceType); end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!