About getting answers with "SYM" function
1 view (last 30 days)
Show older comments
Hi guys,
Now I am try to getting start with Matlab.
I get a equation
Px=sym('(L1+L2*cos(A2)+L3*cos(A2+A3))*cos(A1)')
A1 A2 A3 L1 L2 L3 are some variables
How can I put the value to those variables and finally get the value of Px?
Thanks a lot!!
2 Comments
Bruno Pop-Stefanov
on 22 Jan 2014
What are you trying to do with sym? If you just want to evaluate this formula given your variables then:
A1 = 1;
A2 = 2;
A3 = 3;
L1 = 11;
L2 = 22;
L3 = 33;
Px = ( L1 + L2*cos(A2) + L3*cos(A2+A3) )*cos(A1)
will give you the answer.
Accepted Answer
Walter Roberson
on 22 Jan 2014
Edited: Walter Roberson
on 22 Jan 2014
solve(Px==(L1+L2*cos(A2)+L3*cos(A2+A3))*cos(A1), Py==(L1+L2*cos(A2)+L3*cos(A2+A3))*sin(A1), Pz==(L2*sin(A2)+L3*sin(A2+A3)), A1, A2, A3)
0 Comments
More Answers (0)
See Also
Categories
Find more on Special Values 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!