How to convert symbolic matrix to numeric matrix ?

조회 수: 9 (최근 30일)
Mohammed kandeel
Mohammed kandeel 2018년 4월 15일
댓글: Mohammed kandeel 2018년 4월 15일
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.

채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 15일
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
Walter Roberson
Walter Roberson 2018년 4월 15일
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 2018년 4월 15일
Walter thanks a looooooot

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by