How to convert symbolic matrix to numeric matrix ?

67 visualizaciones (últimos 30 días)
Mohammed kandeel
Mohammed kandeel el 15 de Abr. de 2018
Comentada: Mohammed kandeel el 15 de Abr. de 2018
Let's say i have the following matrix a=[a1*b1, a2-a2, b2*b2; a1+a1, b2-b2, a2*a2] if you can see that the the first row second column contains the same value but subtracted so the value need to be 0 so how can i do this. i just will try to make analysis of 5DOF of robotic arm and i have a lot of values of Angles and have cos and sin so what will be the solution ?
thanks in advance.

Respuesta aceptada

Walter Roberson
Walter Roberson el 15 de Abr. de 2018
simplify() of the matrix will cause it to take steps to try to resolve subtractions and so on. It is not always able to notice identities so it will not always work.
But this would not convert symbolic a1*b1 to numeric.
If your entries are symbolic numbers such as sin(3/84) then if there are no symbolic variables in the matrix then double() the matrix. If there are symbolic variables then vpa() the matrix, but that will not convert the symbolic variable to numeric.
  3 comentarios
Walter Roberson
Walter Roberson el 15 de Abr. de 2018
syms CO1 SO1 L1
T1 = [CO1,0,SO1,0;SO1,0,-CO1,0;0,1,0,L1;0,0,0,1];
Mohammed kandeel
Mohammed kandeel el 15 de Abr. de 2018
Walter thanks a looooooot

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by