MtxExpr.DivideElemC Method

Overload List

#SignatureDescription
1function DivideElemC(const X: TMtx; const Y: TMtxVec; const Z: TCplx): Matrix;Result = X / (Y*zScale), where X is a Matrix
2function DivideElemC(const X: TMtx; const Y: TMtxVec; const Z: Double): Matrix;Result = X / (Y*zScale), when X is a Matrix
3function DivideElemC(const X: TVec; const Y: TMtxVec; const Z: TCplx): Vector;Result = X / (Y*zScale)
4function DivideElemC(const X: TVec; const Y: TMtxVec; const Z: Double): Vector;Result = X / (Y*zScale)

Overload 1: function DivideElemC(const X: TMtx; const Y: TMtxVec; const Z: TCplx): Matrix;

Compute X / (Y*zScale), where X is a Matrix

#NameTypeDescription
1XTMtx
2YTMtxVec
3ZTCplx

Returns: Matrix

Overload 2: function DivideElemC(const X: TMtx; const Y: TMtxVec; const Z: Double): Matrix;

Compute X / (Y*zScale), when X is a Matrix.

#NameTypeDescription
1XTMtx
2YTMtxVec
3ZDouble

Returns: Matrix

Remarks:

The operation does only per-element math.

Overload 3: function DivideElemC(const X: TVec; const Y: TMtxVec; const Z: TCplx): Vector;

Compute X / (Y*zScale)

#NameTypeDescription
1XTVec
2YTMtxVec
3ZTCplx

Returns: Vector

Overload 4: function DivideElemC(const X: TVec; const Y: TMtxVec; const Z: Double): Vector;

Compute X / (Y*zScale)

#NameTypeDescription
1XTVec
2YTMtxVec
3ZDouble

Returns: Vector

Remarks:

Divides X by (Y multiplied by the scalar zScale) without temporary objects.

Examples
uses MtxVec, MtxExpr, Math387;

var
    X, Y, A1, A2, A3: Vector;
    zScale: Double;
begin
    zScale := 2.0;
    X := [10,20,30,40];
    Y := [2,4,6,8];
    A1 := X / (Y * zScale);
    A2 := DivideElemC(X, Y, zScale);
    A3.DivideC(X, Y, zScale);
    if not A2.IsEqual(A1) then ERaise('Problem');
    if not A3.IsEqual(A1) then ERaise('Problem');
end;