You are here: Symbol Reference > AbstractMtxVec Namespace > Classes > TMtxVec Class > public > PhaseSpectrum Method > TMtxVec.PhaseSpectrum Method (TMtxVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxVec.PhaseSpectrum Method (TMtxVec)

The phase angles (spectrum) of object elements.

Pascal
function PhaseSpectrum(const Vec: TMtxVec): TMtxVec; overload;

Calculates the phase angles (spectrum) of all Vec object elements. Phase values are returned in radians and are in the range -PI,PI. Size and Complex properties of the calling object are set implicitly to match Vec object. The phase angles are calculated from the following equation: 

 

var a,b: TVec; begin CreateIt(a,b); try a.SetIt(True,[1,2,3,-4]); // a = [1 + 2i, 3 - 4i] b.PhaseSpectrum(a); // b = [arctan2(1,2), arctan2(3,-4)]; finally FreeIt(a,b); end; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!