Kinematic Equations
Mostrar comentarios más antiguos
Hi, I am trying to Solve Kinematic Equations with certain no. of unknowns and equations(As below) using the syms & solve command. The no of equations that are required to solve for all variables is enough and I have also checked graphically using a CAD tool that a valid solution exists.
But Matlab solver is not able to find an explicit Solution. Please Suggest what can be the possible reason and Solution.
D=sqrt((x1-x4)^2+(y1-y4)^2+(z1-z4)^2);
L=sqrt((A_x-F_x)^2+(A_y-F_y)^2+(A_z-F_z)^2);
R=sqrt((A_x-E_x)^2+(A_y-E_y)^2+(A_z-E_z)^2);
P=sqrt((B_x-G_x)^2+(B_y-G_y)^2+(B_z-G_z)^2);
Q=sqrt((B_x-H_x)^2+(B_y-H_y)^2+(B_z-H_z)^2);
W=sqrt((A_x-B_x)^2+(A_y-B_y)^2+(A_z-B_z)^2);
V=sqrt((A_x-J_x)^2+(A_y-J_y)^2+(A_z-J_z)^2);
S=sqrt((B_x-J_x)^2+(B_y-J_y)^2+(B_z-J_z)^2);
syms a_x a_y a_z b_x b_y b_z j_x j_y j_z r_x r_y r_z;
[solutions_a_x,solutions_a_y,solutions_a_z,solutions_b_x,solutions_b_y,solutions_b_z,solutions_j_x,solutions_j_y,solutions_j_z,solutions_r_x,solutions_r_y,solutions_r_z]=solve((a_x-b_x)*(j_x-r_x)+(a_y-b_y)*(j_y-r_y)+(a_z-b_z)*(j_z-r_z),sqrt((a_x-E_x)^2+(a_y-E_y)^2+(a_z-E_z)^2)-R,sqrt((a_x-F_x)^2+(a_y-F_y)^2+(a_z-F_z)^2)-L,sqrt((b_x-G_x)^2+(b_y-G_y)^2+(b_z-G_z)^2)-P,sqrt((b_x-H_x)^2+(b_y-H_y)^2+(b_z-H_z)^2)-Q,sqrt((a_x-b_x)^2+(a_y-b_y)^2+(a_z-b_z)^2)-W,sqrt((j_x-I_x)^2+(j_y-I_y)^2+(j_z-I_z)^2)-Length_Tie_Rod,sqrt((a_x-j_x)^2+(a_y-j_y)^2+(a_z-j_z)^2)-V,sqrt((b_x-j_x)^2+(b_y-j_y)^2+(b_z-j_z)^2)-S,sqrt((j_x-r_x)^2+(j_y-r_y)^2+(j_z-r_z)^2)-D,((r_x-a_x)/(a_x-b_x))-((r_y-a_y)/(a_y-b_y)),((r_y-a_y)/(a_y-b_y))-((r_z-a_z)/(a_z-b_z)),a_x,a_y,a_z,b_x,b_y,b_z,j_x,j_y,j_z,r_x,r_y,r_z,'Real',true);
The value of variables "A_x, A_y, A_z, B_x, B_y, B_z, E_x, E_y, E_z, F_x, F_y, F_z, G_x, G_y, G_z, H_x, H_y, H_z, I_x, I_y, I_z, x1, y1, z1, x4, y4, z4, Length_Tie_Rod J_x, J_y, J_z," are already calculated or given.
Please Suggest Something.
Thanks
-Varun
Respuesta aceptada
Más respuestas (1)
varun jain
el 8 de Feb. de 2012
0 votos
1 comentario
Walter Roberson
el 8 de Feb. de 2012
A lot depends upon the relationship between the variables. Some forms would become relatively easy to solve by way of arccos() and the like, but other forms you do not really get anywhere.
For example,
solve(cos(x)+y^2-x*sin(y) = 7, [x, y])
The solution Maple comes up with for that is
x = x, y = RootOf(cos(x)+_Z^2-x*sin(_Z)-7)
which is not much more than a rearrangement of form, with all of the hard work tossed in to the root finder. You cannot even tell, for example, that this has 6 roots near x=0 with two of them real-valued -- but out near x=-30 there are 3 real roots.
MuPAD does not appear to be useful at processing RootOf() such as the above.
If you post the transformed equation, I could _try_.
Categorías
Más información sobre Numeric Solvers en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!