You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > clMatrix Structure > clMatrix Methods > CartToPolar Method > clMatrix.CartToPolar Method (TOpenCLMtxVec, TOpenCLMtxVec)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
clMatrix.CartToPolar Method (TOpenCLMtxVec, TOpenCLMtxVec)

Converts elements from cartesian to polar coordinate form.

Syntax
C#
Visual Basic
public void CartToPolar(TOpenCLMtxVec AmpltVec, TOpenCLMtxVec PhaseVec);

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: clMatrix; begin A.CopyCplxFromArray(2,2,TSingleArray.Create(1,0, 2,0 2,0 4,1)); // 2x2, complex matrix A.CartToPolar(Amplt, Phase); end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!