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