TOpenCLMtxVec PhaseSpectrum(TOpenCLMtxVec Vec)
The phase angles (spectrum) of object elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
Result: stored in self (calling object), returns self for chaining
Remarks:
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 Dew.Math.clVector.Complex properties of the calling object are set implicitly to match Vec object. The phase angles are calculated from the following equation:
Examples
clVector a;
clVector b;
a.CopyFromArray(TSingleArray.Create(1,2,3,-4)); // a = [1 + 2i, 3 - 4i]
b.PhaseSpectrum(a); // b = [arctan2(1,2), arctan2(3,-4)];
See Also: clVector.PowerSpectrum, clVector.ArcTan2
Indexed: TOpenCLMtxVec PhaseSpectrum(TOpenCLMtxVec Vec, Int32 VecIndex, Int32 Index, Int32 Len)
Calculates the power spectrum from the Vec elements [VecIndex]..[VecIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | VecIndex | Int32 | |
| 3 | Index | Int32 | start index |
| 4 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Remarks:
Store the results in calling object elements [Index]..[Index+Len-1]. An exception is raised if array borders are overrun/underrun.