フィルターのクリア

How to convert symbolic matrix to numeric matrix ?

12 ビュー (過去 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 Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by