cordicatan2
CORDIC-based four quadrant inverse tangent
Syntax
theta = cordicatan2(y,x)
theta = cordicatan2(y,x,niters)
Description
theta = cordicatan2(y,x)
computes the four
quadrant arctangent of y
and x
using
a CORDIC algorithm approximation.
theta = cordicatan2(y,x,niters)
performs niters
iterations
of the algorithm.
Input Arguments
|
|
|
|
Output Arguments
|
|
Examples
Floating-point CORDIC arctangent calculation.
theta_cdat2_float = cordicatan2(0.5,-0.5) theta_cdat2_float = 2.3562
Fixed- point CORDIC arctangent calculation.
theta_cdat2_fixpt = cordicatan2(fi(0.5,1,16,15),fi(-0.5,1,16,15)); theta_cdat2_fixpt = 2.3562 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 13