How do I simplify the expanded equation with syms symbols
4 ビュー (過去 30 日間)
古いコメントを表示
syms s [1 6]; syms c [1 6]; syms a2 a3 d3 d4; syms R_1 [1 3];syms R_2 [1 3];syms R_3 [1 3] ;
syms Px Py Pz;
syms theta1 theta2 theta3 theta4 theta5 theta6;
syms c23 s23;
T_01_14 = a2*c2 - Py*s1 - Px*c1 + a3*c23 - d4*s23
T_01_34 = -Pz - c23*d4 - a2*s2 - a3*s23
T_01_24 = Py*c1 - d3 - Px*s1
eqT_01 = T_01_14^2 + T_01_34^2 + T_01_24^2
eqT_01 = subs(eqT_01,[c1 s1 c2 s2 c3 s3 c23 s23], [cos(theta1) sin(theta1) cos(theta2) sin(theta2) cos(theta3) sin(theta3) cos(theta2)*cos(theta3)-sin(theta2)*sin(theta3) cos(theta2)*sin(theta3)+sin(theta2)*cos(theta3)])
eqT_01 = subs(eqT_01,[cos(theta1) sin(theta1) cos(theta2) sin(theta2) cos(theta3) sin(theta3)], [c1 s1 c2 s2 c3 s3])
eqT_01 = expand(eqT_01)
eqT_01 = simplify(eqT_01)
I am trying to simplify the final eqT_01 equation but I am not able to get it to simplify.
My goal is to find the equation:
by squaring these 3 equations:
(which in my code are T_01_14, T_01_34 and T_01_24)
If you know a better way, please let me know how,
Thank you
0 件のコメント
回答 (1 件)
Gokul Nath S J
2023 年 5 月 26 日
Hi Rohan,
It seems that your question has already been answered in one of the MATLAB Answer post. Please refer to the following link for more information.
with regards,
Gokul Nath S J
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!