我的数学模型是利用一个方程组求出θ1,θ2,θ3的表达式。数学模型如上传的图片。其中H1,H2,H3,l1,l2,l3,r,R均为已知。θ1,θ2,θ3取值范围为0-60°。
我编写的求解函数如下,总是报错,还请各位高手帮助
syms H1 H2 H3 l1 l2 l3 R r theta1 theta2 theta3
eq1=(3/2*R-l1.*sin(theta1)-1/2*l2.*sin(theta2)).^2+(sqrt(3)/2*(l2.*sin(theta2)-R))^2+(H1-l1.*cos(theta1)-H2+l2.*cos(theta2)).^2-3*(r.^2);
eq2=(1/2*(l2.*sin(theta2)-l3.*sin(theta3))).^2+(sqrt(3)/2*(2*R-l2.*sin(theta2)-l3.*sin(theta3))).^2+(H2-l2.*cos(theta2)-H3+l3.*cos(theta3)).^2-3*(r.^2);
eq3=(3/2*R-l1.*sin(theta1)-1/2*l3.*sin(theta3)).^2+(sqrt(3)/2*(R-l3.*sin(theta3))).^2+(H1-l1.*cos(theta1)-H3+l3.*cos(theta3)).^2-3*(r.^2);
theta0=[rand[1,3]*60]
f = matlabFunction([eq1;eq2;eq3],'vars',{[theta1 theta2 theta3]});
options=optimset('Display','iter','MaxFunEvals',1000,'TolFun',1e-10);
[x,fval,exitflag,output]=fsolve(f,theta0,options)
![这个高次方程组数学模型怎么求解呢?]()
111.jpg |