Vitaly Badeev / Mbed 2 deprecated Radar1

Dependencies:   FT800_2 mbed Encoder

Embed: (wiki syntax)

« Back to documentation index

Complex Magnitude

Complex Magnitude
[Complex Math Functions]

Computes the magnitude of the elements of a complex data vector. More...

Functions

void arm_cmplx_mag_f32 (float32_t *pSrc, float32_t *pDst, uint32_t numSamples)
 Floating-point complex magnitude.

Detailed Description

Computes the magnitude of the elements of a complex data vector.

The pSrc points to the source data and pDst points to the where the result should be written. numSamples specifies the number of complex samples in the input array and the data is stored in an interleaved fashion (real, imag, real, imag, ...). The input array has a total of 2*numSamples values; the output array has a total of numSamples values. The underlying algorithm is used:

    
 for(n=0; n<numSamples; n++) {    
     pDst[n] = sqrt(pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2);    
 }    
 

There are separate functions for floating-point, Q15, and Q31 data types.


Function Documentation

void arm_cmplx_mag_f32 ( float32_t *  pSrc,
float32_t *  pDst,
uint32_t  numSamples 
)

Floating-point complex magnitude.

Parameters:
[in]*pSrcpoints to complex input buffer
[out]*pDstpoints to real output buffer
[in]numSamplesnumber of complex samples in the input vector
Returns:
none.

Definition at line 84 of file arm_cmplx_mag_f32.c.