You are here: Symbol Reference > MtxExpr Namespace > Classes > Matrix Record > public > Matrix.MtxFunction Method
MtxVec VCL
ContentsIndex
PreviousUpNext
Matrix.MtxFunction Method

Compute matrix function as a function of 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 matrix 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(Src: TMtx; Exponent: TCplx; SourceType: TMtxType = mtGeneral): TMtx; begin MtxPower := 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!