You are here: Symbol Reference > MtxExpr Namespace > Classes > Matrix Record > public > CartToPolar Method > Matrix.CartToPolar Method (TMtxVec, TMtxVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
Matrix.CartToPolar Method (TMtxVec, TMtxVec)

Converts elements from cartesian to polar coordinate form.

Pascal
procedure CartToPolar(AmpltVec: TMtxVec; PhaseVec: TMtxVec); overload;

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.

var A,Amplt,Phase: Matrix; begin A.SetIt(2,2,True,[1,0, 2,0 2,0 4,1]); A.CartToPolar(Amplt,Phase); end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!