Matrix.InvElem Method

Overload List

#SignatureDescription
1function InvElem: TMtx;The inverse of matrix elements.
2function InvElem(const SrcMtx: TMtx; Threshold: Double): TMtx;Invert all Mtx elements and store them in the calling matrix.
3function InvElem(Threshold: Double): TMtx;Invert all Mtx elements and store them in the calling matrix.

Overload 1: function InvElem: TMtx;

The inverse of matrix elements.

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

Remarks:

Calculates the inverse of all matrix elements in place. The computation occurs after first limiting the magnitude of each elements by the lower bound of Treshhold. The limiting operation is performed to avoid division by zero. Since threshold represents a magnitude, it is always real and must always be positive. For complex versions, the magnitude of the input is limited, but the phase remains unchanged. Zero-valued input is assumed to have zero phase. To bypass the limiting operation set the Threshold to zero.

Examples
var  A: Matrix;
begin
    A.SetIt(2,2,False,[1,2,
        2,4]);  // 2x2, not complex matrix
    A.InvElem(1.0e-7);
end;
See Also: Matrix.MulElem

Overload 2: function InvElem(const SrcMtx: TMtx; Threshold: Double): TMtx;

Invert all Mtx elements and store them in the calling matrix.

#NameTypeDescription
1SrcMtxTMtx
2ThresholdDoublescalar

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

Remarks:

The Matrix.Rows, Matrix.Cols and Matrix.Complex properties of the calling matrix are set implicitly to match Mtx matrix. If threshold is omitted then the default value 1/MAXNUM is used.

Overload 3: function InvElem(Threshold: Double): TMtx;

Invert all Mtx elements and store them in the calling matrix.

#NameTypeDescription
1ThresholdDoublescalar

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