You are here: Symbol Reference > clMtxExpr Namespace > Classes > clMatrix Record > public > PhaseSpectrum Method > clMatrix.PhaseSpectrum Method (TOpenCLMtxVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
clMatrix.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 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: clMatrix; begin a.CopyCplxFromArray(1,2,TSingleArray.Create(1,2,3,-4)); // a = [1 + 2i, 3 - 4i] b.PhaseSpectrum(a); // b = [arctan2(1,2), arctan2(3,-4)]; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!