Matlabwilliam hill官网
直播中

何文杰

11年用户 20经验值
擅长:制造/封装
私信 关注
[问答]

用fsolve求解非线性方程组

刚学matlab,用它求解一个非线性方程组,结果提示如下错误:
Solver stopped prematurely.

fsolve stopped because it exceeded the function evaluation limit,
options.MaxFunEvals = 1500 (the default value).
这个错在哪儿,怎么解决啊?
  1. function f=group(t)
  2. x(1)=t(1); %x(1)=Ft3%
  3. x(2)=t(2); %x(2)=FAa%
  4. x(3)=t(3); %x(3)=FBa%
  5. x(4)=t(4); %x(4)=FCa%
  6. x(5)=t(5); %x(5)=FDa%
  7. x(6)=t(6); %x(6)=FAr%
  8. x(7)=t(7); %x(7)=FBr%
  9. x(8)=t(8); %x(8)=FCr%
  10. x(9)=t(9); %x(9)=FDr%
  11. x(10)=t(10); %x(10)=aA%
  12. x(11)=t(11); %x(11)=aB%
  13. x(12)=t(12); %x(12)=aC%
  14. x(13)=t(13); %x(13)=aD%
  15. x(14)=t(14); %x(14)=Fa3%
  16. x(15)=t(15); %x(15)=Fr3%
  17. a1=0.058; %a1=LA%
  18. a2=0.058; %a2=LB%
  19. a3=0.111; %a3=LC%
  20. a4=0.111; %a4=LD%
  21. a5=0.036; %a5=LA'%
  22. a6=0.036; %a6=LB'%
  23. a7=0.027; %a7=L1%
  24. a8=0.027; %a8=L3%
  25. b1=0.033; %b1=R%
  26. b2=0.102; %b2=R1%
  27. b3=0.126; %b3=R3%
  28. c1=40.352; %c1=TH%
  29. d1=0.15; %d1=Jy%
  30. d2=0.311; %d2=Jz%
  31. d3=0.67; %d3=Ya%
  32. d4=0.67; %d4=Yc%
  33. d5=74.351; %d5=WH%
  34. d6=20*pi/180; %d6=β%
  35. d7=20*pi/180; %d7=α%
  36. d8=80*pi/180; %d8=δ3%
  37. d9=116*pi/180; %d9=δ1%
  38. c4=c1/b2*cos(d7); %c4=Ft1%
  39. c2=c4*tan(d7)*sin(d9); %c2=Fa1%
  40. c3=c4*tan(d7)*cos(d9); %c3=Fr1%
  41. f=zeros(15,1);
  42. f(1)=x(7)*sin(x(11))*a2-x(6)*sin(x(10))*a1-x(9)*sin(x(13))*a4-x(8)*sin(x(12))*a3;
  43. f(2)=-x(8)*cos(x(12))*a3-x(9)*cos(x(10))*a4-x(6)*cos(x(10))*a1*cos(d6)-x(7)*cos(x(11))*a2*cos(d6);
  44. f(3)=-c1-x(6)*cos(x(10))*a1*sin(d6)+x(7)*cos(x(11))*a2*sin(d6);
  45. f(4)=-x(6)*cos(x(10))-x(8)*cos(x(12))-x(7)*cos(x(11))-x(9)*cos(x(13));
  46. f(5)=-x(6)*sin(x(10))*cos(d6)-x(7)*sin(x(11))*cos(d6)-x(9)*sin(x(13))-x(8)*sin(x(12))+x(3)*sin(d6)-x(2)*sin(d6);
  47. f(6)=x(4)-x(5)+x(3)*cos(d6)-x(2)*cos(d6)+x(6)*sin(x(10))*sin(d6)-x(7)*sin(x(11))*sin(d6);
  48. f(7)=c2*b2+x(14)*b3+c3*a7+x(15)*a8+x(2)*b1*sin(x(10))-x(3)*b1*sin(x(11))+x(6)*a5*sin(x(10))-x(7)*a6*sin(x(11))-sin(d6)*((1-cos(d6))*d2+d1*cos(d6))*d5^2;
  49. f(8)=-x(6)*cos(x(10))*a5+x(7)*cos(x(11))*a6-x(2)*cos(x(10))*b1+x(3)*cos(x(11))*b1-c4*a7+x(1)*a8;
  50. f(9)=-c4*b2+x(1)*b3;
  51. f(10)=x(2)-x(6)/(2*d3);
  52. f(11)=x(3)-x(6)/(2*d3)-c2-x(14);
  53. f(12)=x(4)-x(8)/(2*d4);
  54. f(13)=x(5)-x(8)/(2*d4)-(x(3)-x(2))*cos(d6)-(x(7)*sin(x(11))+x(6)*sin(x(10)))*sin(d6);
  55. f(14)=x(14)-x(1)*tan(d7)*sin(d8);
  56. f(15)=x(15)-x(1)*tan(d7)*cos(d8);

更多回帖

发帖
×
20
完善资料,
赚取积分