Solving 2 Trigonometric Equation with 2 Unknowns
이전 댓글 표시
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
David Goodmanson
2019년 11월 18일
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!