File Exchange

image thumbnail

Fixed-Point ATAN2 using CORDIC

version 1.0.0.1 (10.9 KB) by

This demo shows how a fixed-point cordic algorithm to calculate a phase from polar coordinates (arct

7 Downloads

Updated

View License

This demo consists of a m-file script (fixed_point_atan2_using_cordic.m) and a m-file function (atan2_fixpt.m). The script contains a step-by-step explanation of how a four quadrant arctan can be calculated using a CORDIC (COordinate Rotation DIgital Computer) algorithm. The first part shows the CORDIC algorithm in floating-point double precision, whereas the second part of the m-file explains how to implement the CORDIC in 16-bit fixed-point with bit shifts. The third part shows how to generate C code for the m-file function to speed-up the algorithm.
The m-file function contains an implementation of the CORDIC in Embedded MATLAB™ compliant m-code. This function can be used to generate C-code or HDL (VHDL or Verilog) in MATLAB® of Simulink®.

Comments and Ratings (1)

Ali

Ali (view profile)

can you please elaborate how you came across the trade off between fixed point and algorithmic precision.
Thanks

Updates

1.0.0.1

Updated license

MATLAB Release
MATLAB 7.5 (R2007b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video