I am unable to get the ans can someone tell how can i solve this
1 次查看(过去 30 天)
显示 更早的评论
clear
clc
close all
a1=0.05;
a2=0.44;
a3=0.035;
d4=0.42;
d6=0.092;
t4=0;
t5=0;
t6=0;
C=[0,0,0.65];
A=[cos(t1)*(a1+a2*cos(t2)+a3*cos(t2+t3)+d4*sin(t2+t3)+d6*(cos(t2+t3)*cos(t4)*sin(t5)+sin(t2+t3)*cos(t5)))+d6*sin(t1)*sin(t4)*sin(t5)==0,sin(t1)*(a1+a2*cos(t2)+a3*cos(t2+t3)+d4*sin(t2+t3)+d6*(cos(t2+t3)*cos(t4)*sin(t5)+sin(t2+t3)*cos(t5)))+d6*cos(t1)*sin(t4)*sin(t5)==0,a2*sin(t2)+a3*sin(t2+t3)+d6*(sin(t2+t3)+cos(t4)*sin(t5)-cos(t2+t3)*cos(t5))==0.65];
S= vpasolve(A,[t1,t2,t3]);
0 个评论
采纳的回答
Rishabh Singh
2021-11-30
Hey Vinay,
Usage of variables "t1", "t2", "t3" is in form of symbolic variables. So declaring them as shown below will resolve the issue,
clear
clc
close all
a1=0.05;
a2=0.44;
a3=0.035;
d4=0.42;
d6=0.092;
t4=0;
t5=0;
t6=0;
C=[0,0,0.65];
syms t1 t2 t3;%declaring variables as symbolic variables
A=[cos(t1)*(a1+a2*cos(t2)+a3*cos(t2+t3)+d4*sin(t2+t3)+d6*(cos(t2+t3)*cos(t4)*sin(t5)+sin(t2+t3)*cos(t5)))+d6*sin(t1)*sin(t4)*sin(t5)==0,
sin(t1)*(a1+a2*cos(t2)+a3*cos(t2+t3)+d4*sin(t2+t3)+d6*(cos(t2+t3)*cos(t4)*sin(t5)+sin(t2+t3)*cos(t5)))+d6*cos(t1)*sin(t4)*sin(t5)==0,
a2*sin(t2)+a3*sin(t2+t3)+d6*(sin(t2+t3)+cos(t4)*sin(t5)-cos(t2+t3)*cos(t5))==0.65];
S= solve(A,[t1,t2,t3]);
For your specific application I would suggest using "solve symbolic equations". This will display the solutions in the live editor and can load the symbolic equations directly from the workspace.
Hope this helps.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!