Borrar filtros
Borrar filtros

Why the output is weird ?

9 visualizaciones (últimos 30 días)
siti khadijah
siti khadijah el 23 de Mayo de 2014
Comentada: Star Strider el 13 de Jun. de 2014
Dear all,
I have a question here. Let me paste my code here and then I'll address my problem.
if true
% code
Rotz_theta = [cos(theta1), -sin(theta1), 0, 0;
sin(theta1), cos(theta1), 0, 0;
0, 0, 1, 0;
0, 0, 0, 1];
Rotx_pi = [1, 0, 0, 0;
0, cos(pi/2), -sin(pi/2), 0;
0, sin(pi/2), cos(pi/2), 0;
0, 0, 0, 1];
H0_1 = Rotz_theta * Rotx_pi
end
And this is the output :
if true
% code
H0_1 =
[ cos(theta1), -(4967757600021511*sin(theta1))/81129638414606681695789005144064,
sin(theta1), 0]
[ sin(theta1), (4967757600021511*cos(theta1))/81129638414606681695789005144064,
-cos(theta1), 0]
[ 0, 1,
4967757600021511/81129638414606681695789005144064, 0]
[ 0, 0,
0, 1] end
May anyone help me to figure out what is happening here? i've tried to change the format to short, but it still give the same answer :(
Thank you in advance :)
Skali

Respuesta aceptada

Star Strider
Star Strider el 23 de Mayo de 2014
Use the vpa function.
  2 comentarios
siti khadijah
siti khadijah el 13 de Jun. de 2014
Thanks Star Strider :)
Star Strider
Star Strider el 13 de Jun. de 2014
My pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by