Overload List
| # | Signature | Description |
|---|---|---|
| 1 | procedure CartToPolar(AmpltVec: TMtxVec; PhaseVec: TMtxVec); | Converts elements from cartesian to polar coordinate form. |
| 2 | procedure CartToPolar(AmpltVec: TMtxVec; PhaseVec: TMtxVec; AmpltIndex: Integer; PhaseIndex: Integer; Index: Integer; Len: Integer); | Convert calling object elements [Index] to [Index+Len-1] from cartesian to polar form. |
Overload 1: procedure CartToPolar(AmpltVec: TMtxVec; PhaseVec: TMtxVec);
Converts elements from cartesian to polar coordinate form.
Result: stored in self (calling object)
Converts all calling object elements from cartesian to polar coordinate form, storing the magnitude (radius) component of corresponding elements in the AmpltVec and the phase (angle) component of corresponding elements in the PhaseVec. If you want to use this method then the calling matrix Matrix.Complex property must be true. If this is not the case, an exception is raised. Size and Matrix.Complex properties of AmpltVec and PhaseVec are set automatically.
var A,Amplt,Phase: Matrix;
begin
A.SetIt(2,2,True,[1,0, 2,0
2,0 4,1]);
A.CartToPolar(Amplt,Phase);
end;
Overload 2: procedure CartToPolar(AmpltVec: TMtxVec; PhaseVec: TMtxVec; AmpltIndex: Integer; PhaseIndex: Integer; Index: Integer; Len: Integer);
Convert calling object elements [Index] to [Index+Len-1] from cartesian to polar form.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AmpltVec | TMtxVec | source TVec or TMtx |
| 2 | PhaseVec | TMtxVec | source TVec or TMtx |
| 3 | AmpltIndex | Integer | |
| 4 | PhaseIndex | Integer | |
| 5 | Index | Integer | start index |
| 6 | Len | Integer | element count |
Result: stored in self (calling object)
Store the results in AmpltVec (radius values) and PhaseVec(phase values). Size and Matrix.Complex properties of the calling Matrix must be set explicitly. An exception is raised if Matrix.ConditionCheck is True and array borders are overrun or underrun.