You are here: Symbol Reference > clMtxExpr Namespace > Classes > clVector Record > public > CartToPolar Method > clVector.CartToPolar Method (TOpenCLMtxVec, TOpenCLMtxVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
clVector.CartToPolar Method (TOpenCLMtxVec, TOpenCLMtxVec)

Converts elements from cartesian to polar coordinate form.

Pascal
procedure CartToPolar(AmpltVec: TOpenCLMtxVec; PhaseVec: TOpenCLMtxVec); 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: clVector; begin A.CopyCplxFromArray(TSingleArray.Create(1,0, 2,0, 2,0 4,1)); // 4, complex matrix 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!