Summary
Converts elements from cartesian to polar coordinate form.
Class
TMtxVec
Declaration
Procedure CartToPolar(AmpltVec, PhaseVec: TMtxVec);
Description
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
Complex property must be true. If this is not the case, an exception is raised. Size and
Complex properties of AmpltVec and PhaseVec are set automatically.
Example 1
var A,Amplt,Phase: TMtx;
begin
CreateIt(A,Amplt,Phase);
try
A.SetIt(2,2,True,[1,0, 2,0
2,0 4,1]); // 2x2, complex matrix
A.CartToPolar(Amplt,Phase);
finally
FreeIt(A,Amplt,Phase);
end;
end;
Declaration
Procedure CartToPolar(AmpltVec, PhaseVec: TMtxVec; AmpltIndex, PhaseIndex, Index, Len: integer);
Description
Convert calling object elements [Index] to [Index+Len-1] from cartesian to polar form and store the results in AmpltVec (radius values) and PhaseVec(phase values). Size and Complex properties of the calling vector must be set explicitly. An exception is raised if
ConditionCheck is True and array borders are overrun or underrun.
| Copyright 2008 Dew Research |
http://www.dewresearch.com