Evaluation of expression resulted in an invalid output. Only finite double vector or matrix outputs are supported
function [ff]=myfun(u)
Alpha_2=u(1);Omega_2=u(2);Theta_2=u(3);
Omega_3=u(4);Theta_3=u(5);
Omega_4=u(6);Theta_4=u(7); %定义输入的变量
global rs_1 rs_2 rs_3 rs_4
rs_1=304.8;
rs_2=101.6;
rs_3=254.0;
rs_4=177.8;
ff(1)=(-(Omega_2)^2*(rs_2)*cos((Theta_2)-(Theta_4))-(Omega_3)^2*(rs_3)*cos((Theta_3)-(Theta_4))+(Omega_4)^2*(rs_4))/((rs_3)*sin((Theta_3)-(Theta_4)));
ff(2)=((Omega_2)^2*(rs_2)*cos((Theta_2)-(Theta_3))-(Omega_4)^2*(rs_4)*cos((Theta_4)-(Theta_3))+(Omega_3)^2*(rs_3))/((rs_4)*sin((Theta_4)-(Theta_3)));
ff=[ff(1) ff(2)];