CORDICbased approximation of Cartesiantopolar conversion
[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)
using a CORDIC algorithm approximation, returns the polar coordinates,
angle [theta,r]
= cordiccart2pol(x
,y
)theta
and radius r
,
of the Cartesian coordinates, x
and y
.
performs [theta,r]
= cordiccart2pol(x
,y
, niters
)niters
iterations
of the algorithm.
specifies both the number of iterations and, depending on the Boolean
value of [theta,r]
= cordiccart2pol(x
,y
, niters
,'ScaleOutput',b)b
, whether to scale the r
output
by the inverse CORDIC gain value.
scales the [theta,r]
= cordiccart2pol(x
,y
,
'ScaleOutput',b)r
output
by the inverse CORDIC gain value, depending on the Boolean value of b
.




Optional commaseparated pairs of Name,Value
arguments,
where Name
is the argument name and Value
is
the corresponding value. Name
must appear inside
single quotes (''
).

Default: 




Convert fixedpoint 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: Fixedpoint: 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: Fixedpoint: 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: Fixedpoint: 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: Fixedpoint: binary point scaling Signedness: Signed WordLength: 18 FractionLength: 15
[1] Volder, JE. "The CORDIC Trigonometric Computing Technique." IRE Transactions on Electronic Computers. Vol. EC8, 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.
[3] Walther, J.S. "A Unified Algorithm for Elementary Functions." HewlettPackard Company, Palo Alto. Spring Joint Computer Conference, 1971, pp. 379–386. (from the collection of the Computer History Museum). www.computer.org/csdl/proceedings/afips/1971/5077/00/50770379.pdf
[4] Schelin, Charles W. "Calculator Function Approximation." The American Mathematical Monthly. Vol. 90, No. 5, May 1983, pp. 317–325.