MATALB function of all modes of CORDIC.
All functions have test script, respectively.
theta: rotation angle
u : input complex vector
n : # of iteration
- Circular mode: v is the output vector after rotation by theta.
v = myCordicRotate0(theta, u ,niters)
- Linear mode: v = imag(u) + real(u)*theta
v = myCordicRotate1(theta, u ,niters)
- Hyperbolic and Rotation mode: v is the output vector rotated by hyperbolic function.
For example, u = (1, 0), and then v = (sinh(theta), cosh(theta))
v = myCordicRotate2(theta, u ,niters)
u : input complex vector
n : # of iteration
- Circular mode: real(v) = magnitude of u; imag(v) = total rotation angles
v = myCordicVector0(u ,niters)
- Linear mode: v = imag(u)/real(u)
v = myCordicVector1(u ,niters)
- Hyperbolic mode: real(v) = sqrt(real(u)^2 - imag(u)^2), imag(v) = arctanh(imag(u)/real(u))
v = myCordicVector2(u ,niters)