TMtx.CplxToReal Method

Overload List

#SignatureDescription
1procedure CplxToReal(const ReVec: TMtxVec; const ImVec: TMtxVec);Split complex calling object in real and imaginary part.
2procedure CplxToReal(const ReVec: TMtxVec; const ImVec: TMtxVec; ReIndex: Integer; ImIndex: Integer; Index: Integer; Len: Integer);Split calling object elements [Index]..[Index+Len-1] into real and imaginary components.

Overload 1: procedure CplxToReal(const ReVec: TMtxVec; const ImVec: TMtxVec);

Split complex calling object in real and imaginary part.

#NameTypeDescription
1ReVecTMtxVecsource TVec or TMtx
2ImVecTMtxVecsource TVec or TMtx

Result: stored in self (calling object)

Remarks:

Split calling object into real and imaginary components. Store all real components in ReVec and all imaginary components in ImVec. Size and TMtxVec.Complex properties of ReVec and ImVec are set implicitly to match with the calling vector. An execption is raised if calling object is not complex.

Examples
var a,b,c: Matrix;
begin
    a.SetIt(1,2,True,[1,-2,3,4]);
    a.CplxToReal(b,c);
end;

Overload 2: procedure CplxToReal(const ReVec: TMtxVec; const ImVec: TMtxVec; ReIndex: Integer; ImIndex: Integer; Index: Integer; Len: Integer);

Split calling object elements [Index]..[Index+Len-1] into real and imaginary components.

#NameTypeDescription
1ReVecTMtxVecsource TVec or TMtx
2ImVecTMtxVecsource TVec or TMtx
3ReIndexInteger
4ImIndexInteger
5IndexIntegerstart index
6LenIntegerelement count

Result: stored in self (calling object)

Remarks:

Store real components in ReVec elements [ReIndex]..[ReIndex+Len-1] and imaginary components in ImVec elements [ImIndex]..[ImIndex+Len-1]. Size and TMtxVec.Complex properties must be set explicitly. An exception is raised if TMtxVecBase.ConditionCheck is true and array borders are overrun or underrun.