You are here: Symbol Reference > AbstractMtxVec Namespace > Classes > TMtxVec Class > published > TMtxVec.Complex Property
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxVec.Complex Property

Defines if object values are complex.

Pascal
property Complex: boolean;

If true, TMtxVec will treat it's elements as complex numbers. Two successive number in the values array be treated as real and imaginary part of the complex number. When property is false, object will treat it's elements as real numbers. You should always set the value of the Complex property before setting object size (Length for vector or TMtx.Rows,TMtx.Cols for matrix). Setting Complex from true to false does not cause memory reallocation. It simply doubles the value of the Length property. Setting Complex from false to true halves the vector length or number of matrix columns, but retains all data. Complex property is initially false.

TMtxVecBase.Length, TMtx.Rows, TMtx.Cols

var a,b,c,d: TVec; begin CreateIt(a,b,c); try a.SetIt(True,[1,2,3,4]); b.SetIt(False,[8,9,6,7]); b.Complex := True; c.Mul(a,b); // = [(1+2i)*(8*9i), (3+4i)*(6+7i)] finally FreeIt(a,b,c); end; end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!