Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function PolarToCart(AmpltVec: TMtxVec; PhaseVec: TMtxVec): TMtxVec; | Converts the polar magnitude/phase pairs to cartesian pairs. |
| 2 | function PolarToCart(AmpltVec: TMtxVec; PhaseVec: TMtxVec; AIndex: Integer; PIndex: Integer; Index: Integer; Len: Integer): TMtxVec; | Convert AmpltVec elements [AIndex]..[AIndex+Len-1] and PhaseVec elements [PIndex]..[PIndex+Len-1] from polar form (radius,angle) to cartesian form (X,y). |
Overload 1: function PolarToCart(AmpltVec: TMtxVec; PhaseVec: TMtxVec): TMtxVec;
Converts the polar magnitude/phase pairs to cartesian pairs.
Result: stored in self (calling object), returns self for chaining
Convert all AmpltVec and PhaseVec elements (combined) from polar to cartesian form. If AmpltVec and PhaseVec size is not the same, an exeption is raised. The results are stored as complex numbers (X=Re, y=Im) in the calling object. Size and Matrix.Complex properties of the calling object are set implicitly to match AmpltVec and PhaseVec objects.
var a,b,c: Matrix;
begin
a.SetIt(1,4,false,[1,2,3,4]); // a = [1,2,3, 4] //magnitude
b.SetIt(1,4,false,[1,0,1,-1]); // b = [1,0,1,-1] /phase
c.PolarToCart(a,b); // result stored in c = projections to Re and Im axis
end;
Overload 2: function PolarToCart(AmpltVec: TMtxVec; PhaseVec: TMtxVec; AIndex: Integer; PIndex: Integer; Index: Integer; Len: Integer): TMtxVec;
Convert AmpltVec elements [AIndex]..[AIndex+Len-1] and PhaseVec elements [PIndex]..[PIndex+Len-1] from polar form (radius,angle) to cartesian form (X,y).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AmpltVec | TMtxVec | source TVec or TMtx |
| 2 | PhaseVec | TMtxVec | source TVec or TMtx |
| 3 | AIndex | Integer | start index |
| 4 | PIndex | Integer | |
| 5 | Index | Integer | start index |
| 6 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
The results are stored as complex numbers (X=Re, y=Im) in the calling object elements [Index]..[Index+Len-1]. Size and Matrix.Complex properties of the calling object must be set explicitly. An exception is raised if Matrix.ConditionCheck is True and array borders are overrun/underrun.