You are here: Symbol Reference > clMtxExpr Namespace > Classes > clVector Record > public > PowerSpectrum Method > clVector.PowerSpectrum Method (TOpenCLMtxVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
clVector.PowerSpectrum Method (TOpenCLMtxVec)

The power spectrum from object complex values.

Pascal
function PowerSpectrum(const Vec: TOpenCLMtxVec): TOpenCLMtxVec; overload;

Calculates the power spectrum from the Vec object complex values and stores the results (power spectrum) in the real calling object. Size and Complex properties of the calling object are set implicitly to match Vec object. The spectrum elements are squares of the magnitudes of the complex input elements: 

 

var a,b: clVector; begin a.CopyFromArray(TSingleArray.Create(1,2,3,-4)); // a = [1 + 2i, 3 - 4i] b.PowerSpectrum(a); // b = [1*1 + 2*2, 3*3+(-4)*(-4)] end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!