| Contents | Index |
[theta,r] = cordiccart2pol(x,y)
[theta,r] = cordiccart2pol(x,y, niters)
[theta,r] = cordiccart2pol(x,y, niters,'ScaleOutput',b)
[theta,r] = cordiccart2pol(x,y,
'ScaleOutput',b)
[theta,r] = cordiccart2pol(x,y) using a CORDIC algorithm approximation, returns the polar coordinates, angle theta and radius r, of the Cartesian coordinates, x and y.
[theta,r] = cordiccart2pol(x,y, niters) performs niters iterations of the algorithm.
[theta,r] = cordiccart2pol(x,y, niters,'ScaleOutput',b) specifies both the number of iterations and, depending on the Boolean value of b, whether to scale the r output by the inverse CORDIC gain value.
[theta,r] = cordiccart2pol(x,y, 'ScaleOutput',b) scales the r output by the inverse CORDIC gain value, depending on the Boolean value of b.
Optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes ('').
CORDIC is an acronym for COordinate Rotation DIgital Computer. The Givens rotation-based CORDIC algorithm is among one of the most hardware-efficient algorithms available because it requires only iterative shift-add operations (see [1], [2]) 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, and hyperbolic, and logarithmic functions.
Increasing the number of CORDIC iterations can produce more accurate results, but doing so also increases the expense of the computation and adds latency.
Convert fixed-point Cartesian coordinates to polar coordinates.
[thPos,r] = cordiccart2pol(sfi([0.75:-0.25:-1.0],16,15),sfi(0.5,16,15))
thPos =
0.5881 0.7854 1.1072 1.5708 2.0344 2.3562 2.5535 2.6780
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 13
r =
0.9014 0.7071 0.5591 0.5000 0.5591 0.7071 0.9014 1.1180
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 18
FractionLength: 15
[thNeg,r] = cordiccart2pol(sfi([0.75:-0.25:-1.0],16,15),sfi(-0.5,16,15))
thNeg =
-0.5881 -0.7854 -1.1072 -1.5708 -2.0344 -2.3562 -2.5535 -2.6780
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 13
r =
0.9014 0.7071 0.5591 0.5000 0.5591 0.7071 0.9014 1.1180
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 18
FractionLength: 15
[1] Volder, J.E. "The CORDIC Trigonometric Computing Technique," IRE Transactions on Electronic Computers. Vol. EC-8, September 1959, pp. 330–334.
[2] Andraka, R. "A survey of CORDIC algorithm for FPGA based computers." Proceedings of the 1998 ACM/SIGDA sixth international symposium on Field programmable gate arrays. Feb. 22–24, 1998, pp. 191–200.
cart2pol | cordicatan2 | cordicpol2cart

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |