Solving 2 Trigonometric Equation with 2 Unknowns
Mostrar comentarios más antiguos
Hello everyone !
I've got a graudation project and i stucked in here. Actually I have 6 equations that consist q3 and q4 but I still cannot find the q3 and q4 where the q3,q4 are degree.
Also q1 is known by the given values, here is the code:
px=387.4162;
py=0;
pz=0.0508;
syms q1 q3 q4
r11=0.0005; r12=1; r13=0; r21=0; r22=0; r23=-1; r31=-1; r32=0.0005; r33=0;
q1=atand(py/px);
r11=cosd(q1)*cosd(q3+q4);
r12=-cosd(q1)*sind(q3+q4);
r13=sind(q1);
r21=sind(q1)*cosd(q3+q4);
r22=-sind(q1)*sind(q3+q4);
r23=-cosd(q1);
r31=sind(q3+q4);
r32=cosd(q3+q4);
r33=0;
solve(r11,r12,q3,q4)
1 comentario
David Goodmanson
el 18 de Nov. de 2019
Hi Ferhat,
In the nine equations, q3 and q4 occur only as the sum (q3+q4). So there is no way to solve for q3 and q4 separately. I think you need to go back to the drawing board and take a look at the conversion from cartesian coordinates to spherical coordinates.
Also, the r matrix is supposed to be orthogonal, so for each row and column, the sum of squares of elements should equal 1. In your case you have 1^2 + .0005^2 + 0^2 = 1 which doesn't work. It does work if the input values r12 and r31 are replaced by +-sqrt(1-.0005^2) in the appropriate spots. That quantity happens to equal +-0.999999874999992 and In the usual Matlab format it would show up as +-1.0000, but it's needed for accuracy.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Mathematics 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!