You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > Matrix Structure > Matrix Methods > PolarToCart Method > Matrix.PolarToCart Method (TMtxVec, TMtxVec)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
Matrix.PolarToCart Method (TMtxVec, TMtxVec)

Converts the polar magnitude/phase pairs to cartesian pairs.

Syntax
C#
Visual Basic
public TMtxVec PolarToCart(TMtxVec AmpltVec, TMtxVec PhaseVec);

Convert all AmpltVec and PhaseVec elements (combined) from polar to cartesian form. If AmpltVec and PhaseVec size is not the same, an exeption is raised. The results are stored as complex numbers (X=Re, y=Im) in the calling object. Size and Complex properties of the calling object are set implicitly to match AmpltVec and PhaseVec objects.

var a,b,c: Matrix; begin a.SetIt(1,4,false,[1,2,3,4]); // a = [1,2,3, 4] //magnitude b.SetIt(1,4,false,[1,0,1,-1]); // b = [1,0,1,-1] /phase c.PolarToCart(a,b); // result stored in c = projections to Re and Im axis end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!