Matrix.InvElem Method

Overload List

#SignatureDescription
1TMtx InvElemThe inverse of matrix elements.
2TMtx InvElem(TMtx SrcMtx, Double Threshold)Invert all Mtx elements and store them in the calling matrix.
3TMtx InvElem(Double Threshold)Invert all Mtx elements and store them in the calling matrix.

Overload 1: TMtx InvElem

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
Matrix A;
A.SetIt(2,2,false,[1,2,
2,4]);  // 2x2, !complex matrix
A.InvElem(1.0e-7);
See Also: Matrix.MulElem

Overload 2: TMtx InvElem(TMtx SrcMtx, Double Threshold)

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

#NameTypeDescription
1SrcMtxTMtxsource TMtx
2ThresholdDoublescalar

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

Remarks:

The Dew.Math.Matrix.Rows, Dew.Math.Matrix.Cols and Dew.Math.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: TMtx InvElem(Double Threshold)

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

#NameTypeDescription
1ThresholdDoublescalar

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