How to convert symbolic matrix to numeric matrix ?
66 views (last 30 days)
Show older comments
Mohammed kandeel
on 15 Apr 2018
Commented: Mohammed kandeel
on 15 Apr 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.
0 Comments
Accepted Answer
Walter Roberson
on 15 Apr 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 Comments
Walter Roberson
on 15 Apr 2018
syms CO1 SO1 L1
T1 = [CO1,0,SO1,0;SO1,0,-CO1,0;0,1,0,L1;0,0,0,1];
More Answers (0)
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!