TMtx.MtxFunction Method

TMtx MtxFunction(TMtx Src, TCplx[] Params, TMtxFunction Func, TMtxType SourceType)

Compute matrix function as a function of another matrix.

#NameTypeDescription
1SrcTMtxsource TMtx
2ParamsTCplx[]
3FuncTMtxFunction
4SourceTypeTMtxType

Result: stored in self (calling object), returns self for chaining

Remarks:

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.

Examples
function TMtx.MtxPower(const Src: TMtx; Exponent: TCplx; SourceType: TMtxType = mtGeneral): TMtx;
result = MtxFunction(Src,[Exponent],@DoToPower,SourceType);
See Also: TMtxFunction