CORDIC-based absolute value
r = cordicabs(c)
r = cordicabs(c,niters)
r = cordicabs(c,niters,'ScaleOutput',b)
r = cordicabs(c,'ScaleOutput',b)
Optional comma-separated pairs of
Name is the argument name and
the corresponding value.
Name must appear inside
single quotes (
dblValues = complex(rand(5,4),rand(5,4)); r_dbl_ref = abs(dblValues) r_dbl_cdc = cordicabs(dblValues)
Compute absolute values of fixed-point inputs.
fxpValues = fi(dblValues); r_fxp_cdc = cordicabs(fxpValues)
CORDIC is an acronym for COordinate Rotation DIgital Computer. The Givens rotation-based CORDIC algorithm is one of the most hardware-efficient algorithms available because it requires only iterative shift-add operations (see References). The CORDIC algorithm eliminates the need for explicit multipliers. Using CORDIC, you can calculate various functions such as sine, cosine, arc sine, arc cosine, arc tangent, and vector magnitude. You can also use this algorithm for divide, square root, hyperbolic, and logarithmic functions.
Increasing the number of CORDIC iterations can produce more accurate results, but doing so increases the expense of the computation and adds latency.
The accuracy of the CORDIC kernel depends on the choice of initial values for X, Y, and Z. This algorithm uses the following initial values:
CORDIC functions discard any local
to the input.
The CORDIC functions use their own internal
The output has no attached
Usage notes and limitations:
Variable-size signals are not supported.
The number of iterations the CORDIC algorithm performs,
must be a constant.