- 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
Summary: Calculation of trigonometrical functions sin and cos , using the CORDIC algorithm
lightgraygray0.5
%Calculation of trigonometrical functions cos(theta) and sen(theta)
%by CORDIC algorithm
n=9; %Number of iterations
lutai=[45.00000
26.56505
14.03624
7.12501
3.57633
1.78991
0.89517
0.44761
0.22381];
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
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
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
cosine=x % Coseno
seno1=y % Seno
lightgray
cosine =
0.7093
seno1 =
0.7047
black
- 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}