Skip to content Skip to navigation

Connexions

You are here: Home » Content » Sin and Cos using CORDIC

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Recently Viewed

Sin and Cos using CORDIC

Module by: Luis Moreno

Summary: Calculation of trigonometrical functions sin and cos , using the CORDIC algorithm

lightgraygray0.5

Contents

  • Look up table
  • Variables de Entrada
  • Iteracion Cero
  • n- Iteraciones
  • Valores Obtenidos
  • Referencias

%Calculation of trigonometrical functions cos(theta) and sen(theta)

%by CORDIC algorithm

n=9; %Number of iterations

Look up table

lutai=[45.00000

       26.56505

       14.03624

        7.12501

        3.57633

        1.78991

        0.89517

        0.44761

        0.22381];

Variables de Entrada

xo=.6072;    % coordenada en X=C

yo=0;        % coordenada en Y=0

zo=45; % Ingrese el angulo en grados

ao=sign(zo); %Comprobacion de Signo

Iteracion Cero

x=xo-yo*ao*(2^-(0));

y=yo+xo*ao*(2^-(0));

z=zo-ao*lutai(1); %Carga de primer valor de angulo

zo=z;  %Actualizar zo

xo=x;  %Actualizar xo

yo=y;  %Actualizar yo

if zo>=0  %Comprobacion de signo

    ai=+1;

 else

    ai=-1;

end

n- Iteraciones

    for i=1:n-1

      x=xo-yo*ai*(2^-(i));

      y=yo+xo*ai*(2^-(i));

      z=zo-ai*lutai(i+1);

      if z>=0  %Comprobacion de signo

         ai=+1;

      else

         ai=-1;

      end

      zo=z;      %actualizar zo

      xo=x;      %actualizar xo

      yo=y;      %actualizar yo

    end

Valores Obtenidos

cosine=x % Coseno

seno1=y  % Seno

lightgray

cosine =

 

    0.7093

 

 

seno1 =

 

    0.7047

 

black

Referencias

- Jack E. Volder The CORDIC Trigonometric Computing Technique IRE Transcactions EC-8, 1959, 330-334

- Amaya Ferney*,Velasco Jaime :Diseño de la tangente inversa usando el algoritmo CORDIC

 *Grupo de Automatica y Robotica, GAR, Universidad Javeriana, Cali, Colombia

 E-mail: foamaya@puj.edu.co, jvelasco@univalle.edu.co\end{verbatim}

 

 

 

\end{document}

 

Comments, questions, feedback, criticisms?

Send feedback