MATLAB: How to solve the symbolic nonlinear equation

equationsymbolic

the system of equation has two nonlinear equations in two variables. The equations are:
F(1) = (x(1)-b2*cos(theta2)+a)^2+(x(2)-b2*sin(theta2))^2-c2^2;
F(2) = (x(1)-b1*cos(theta1)+a)^2+(x(2)-b1*sin(theta1))^2-c1^2;
Thanks!

Best Answer

syms b2 a c2 c1 b1 theta2 theta1 x1 x2 % x1 is x(1) so is x2
F=zeros(2,1);
e1=F(1) == (x1-b2*cos(theta2)+a)^2+(x2-b2*sin(theta2))^2-c2^2;
e2=F(2) == (x1-b1*cos(theta1)+a)^2+(x2-b1*sin(theta1))^2-c1^2;
[x1,x2]=solve(e1,e2,x1,x2)