Function

vDSP_zvphas

Calculates the single-precision elementwise phase values, in radians, of the supplied complex vector using the specified stride.

Declaration

void vDSP_zvphas(const DSPSplitComplex *__A, vDSP_Stride __IA, float *__C, vDSP_Stride __IC, vDSP_Length __N);

Parameters

__A

Single-precision complex input vector.

__IA

Stride for A.

__C

Single-precision real output vector.

__IC

Stride for C.

__N

The number of elements to process.

Discussion

Finds the phase values, in radians, of complex vector A and store the results in real vector C. The results are between -pi and +pi. The sign of the result is the sign of the second coordinate in the input vector, except that the vDSP_zvphas function does not necessarily respect the sign of a zero input.

This performs the following operation:

for (n = 0; n < N; ++n)
   C[n] = atan2(Im(A[n]), Re(A[n]));

See Also

Single-Vector Phase Computation

vDSP_zvphasD

Calculates the double-precision elementwise phase values, in radians, of the supplied complex vector using the specified stride.