MATLAB: How to solve a system of trigonometric equations

solvetrigonometric

Hi guys,
I'm trying to solve these equations but nothing works properly… I've tried to do it multiple ways but still no success. This is inverse kinematics. E1, E2, E3 are X, Y and Z(it's a data that a have) l1,l2,l3 are lenghts of the robot links (it's a data that a have). I need to find equations for : theta1, theta2, theta3.
I tried to do that this way, but matlab is keep "Busy" and doesn't return any answer :
syms theta1 theta2 theta3 l1 l2 l3
E1 = cos(theta1)*(l3*cos(theta2+teta3) + l2*cos(theta2))
E2 = sin(theta1)*(l3*cos(theta2+theta3) + l2*cos(theta2))
E3 = l3*sin(theta2+theta3)+l2*sin(theta2)+l1
[theta1,theta2,theta3] = solve(E1,E2,E3,theta1,theta2,theta3)

Best Answer

E1^2 + E2^2 + (E3-l1)^2 - l2^2 - l3^2 = 2*l2*l3*cos(theta3)
Can you take it from here ?