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

The phase angles (spectrum) of object elements.

Pascal
function PhaseSpectrum(const Vec: TOpenCLMtxVec): TOpenCLMtxVec; 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 TOpenCLBase.ComplexComplexproperties of the calling object are set implicitly to match Vec object. The phase angles are calculated from the following equation: 

 

var a,b: TOpenCLVector; begin CreateIt(a,b); try a.CopyCplxFromArray(TSingleArray.Create(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!