I am unable to get the ans can someone tell how can i solve this
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Vinay Basagare
le 25 Nov 2021
Commenté : Vinay Basagare
le 3 Déc 2021
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 commentaires
Réponse acceptée
Rishabh Singh
le 30 Nov 2021
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.
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!