I am unable to get the ans can someone tell how can i solve this
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Vinay Basagare
il 25 Nov 2021
Commentato: Vinay Basagare
il 3 Dic 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 Commenti
Risposta accettata
Rishabh Singh
il 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.
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!