查看: 493|回复: 10|关注: 0

[已答复] fmicon函数求极值,将极值点坐标反带入函数,与求得极值不一样

[复制链接]

新手

5 麦片

财富积分


050


3

主题

20

帖子

0

最佳答案
发表于 2019-1-27 17:20:07 | 显示全部楼层 |阅读模式
我的目的是求q在约束条件下的极值问题,但是求的极值后,将极值点坐标反带入函数,结果却和极值不一样,误差很大,求问什么原因。
第一部分是我求的q的表达式命令,然后将q表达式复制到f函数中。

  1. clc
  2. clear
  3. syms x1 x2 x3 x4 x5 x6 x7 x8 x9 x10
  4. H=20;
  5. h=10;
  6. b=5;
  7. r=20000;
  8. c=10000;
  9. f=22/180*pi;
  10. a0=25/180*pi;
  11. k=1;
  12. v1=sin(x5-x4-a0-2*f)/cos(x2-x3-x4-2*f);
  13. v01=sin(x3-x2+x5-a0-0.5*pi)/cos(x2-x3-x4-2*f);
  14. v12=v1*sin(x1+x2-x3)/sin(x1+x2+2*f);
  15. v2=v1*sin(x3+2*f)/sin(x1+x2+2*f);
  16. v03=sin(x8-x7+x10+a0-0.5*pi)/cos(x7-x8-x9-2*f);
  17. v3=sin(pi+x9-x10-a0+2*f)/cos(x7-x8-x9-2*f);
  18. v34=v3*sin(x6+x7-x8)/sin(x6+x7+2*f);
  19. v4=v3*sin(x8+2*f)/sin(x6+x7+2*f);
  20. ce=h*sin(x2)/sin(x1+x2);
  21. cd=h*sin(x1)/sin(x1+x2);
  22. cn=(cd^2+b^2-2*cd*b*cos(1.5*pi-x2))^0.5;
  23. n1=asin(b*sin(1.5*pi-x2)/cn);
  24. n2=asin(cd*sin(1.5*pi-x2)/cn);
  25. bc=cn*sin(x4-n2)/sin(x3+x4-n1-n2);
  26. bn=cn*sin(x3-n1)/sin(x3+x4-n1-n2);
  27. bf=(bn^2+H^2-2*bn*H*sin(x4))^0.5;
  28. n3=asin(H*cos(x4)/bf);
  29. n4=asin(bn*cos(x4)/bf);
  30. af=bf*cos(x5-a0-n4)/sin(x5);
  31. ab=bf*cos(a0+n4)/sin(x5);
  32. s1=0.5*h*ce*sin(x1);
  33. s2=0.5*cd*b*sin(1.5*pi-x2)+0.5*bc*cn*sin(x3-n1);
  34. s3=0.5*af*ab*sin(x5)+0.5*bn*H*cos(x4);
  35. ij=h*sin(x6)/sin(x6+x7);
  36. hj=h*sin(x7)/sin(x6+x7);
  37. nj=(b^2+ij^2-2*b*ij*cos(1.5*pi-x7))^0.5;
  38. m1=asin(ij*sin(1.5*pi-x7)/nj);
  39. m2=asin(b*sin(1.5*pi-x7)/nj);
  40. kj=nj*sin(x9-m1)/sin(x9+x8-m1-m2);
  41. nk=nj*sin(x8-m2)/sin(x8+x9-m1-m2);
  42. fk=(nk^2+H^2-2*nk*H*sin(x9))^0.5;
  43. m3=asin(H*cos(x9)/fk);
  44. m4=asin(nk*cos(x9)/fk);
  45. fm=fk*cos(a0-m4+x10)/sin(x10);
  46. mk=fk*cos(a0-m4)/sin(x10);
  47. s4=0.5*h*hj*sin(x6);
  48. s5=0.5*b*ij*sin(1.5*pi-x7)+0.5*nj*kj*sin(x8-m2);
  49. s6=0.5*H*nk*sin(0.5*pi-x9)+0.5*fm*mk*sin(x10);
  50. pr=r*((s3+s6)*cos(x5-a0-f-0.5*pi)+s1*v2*cos(x1+f)+s2*v1*cos(x3-x2+f)+s4*v4*cos(x6+f)+s5*v3*cos(x8-x7+f));
  51. pc=c*cos(f)*(ce*v2+cd*v12+bc*v1+bn*v01+ab+mk+nk*v03+kj*v3+ij*v34+hj*v4);
  52. q=(pc-pr)/(b*v1*cos(x3-x2+f)+b*v3*cos(x8-x7+f)+k*h*v2*sin(x1+f)+k*h*v4*sin(x6+f))

复制代码


然后复制到以下函数中
  1. function [ f ] = my41( t )
  2. x1=t(1);
  3. x2=t(2);
  4. x3=t(3);
  5. x4=t(4);
  6. x5=t(5);
  7. x6=t(6);
  8. x7=t(7);
  9. x8=t(8);
  10. x9=t(9);
  11. x10=t(10);
  12. f=q

复制代码


下面是约束条件以及fmincon函数

  1. clc
  2. clear
  3. t0 = [30/180*pi;110/180*pi;110/180*pi;40/180*pi;120/180*pi;30/180*pi;110/180*pi;110/180*pi;40/180*pi;96/180*pi;30/180*pi;110/180*pi;110/180*pi;30/180*pi];
  4. A=[ 0 1 -1 0 -1 0 0 0 0 0 0 0 0 0;...
  5.     0 -1 1 1 0 0 0 0 0 0 0 0 0 0;...
  6.     0 0 0 -1 1 0 0 0 0 0 0 0 0 0;...
  7.     -1 -1 1 0 0 0 0 0 0 0 0 0 0 0;...
  8.     0 0 -1 0 0 0 0 0 0 0 0 0 0 0;...
  9.     1 1 0 0 0 0 0 0 0 0 0 0 0 0;...
  10.     0 0 0 0 0 0 1 -1 0 -1 0 0 0 0;...
  11.     0 0 0 0 0 0 0 0 -1 1 0 0 0 0;...
  12.     0 0 0 0 0 0 -1 1 1 0 0 0 0 0;...
  13.     0 0 0 0 0 -1 -1 1 0 0 0 0 0 0;...
  14.     0 0 0 0 0 1 1 0 0 0 0 0 0 0;...
  15.     0 0 0 0 0 0 0 -1 0 0 0 0 0 0;...
  16.     -1 0 0 0 0 0 0 0 0 0 0 0 0 0;...
  17.     0 -1 0 0 0 0 0 0 0 0 0 0 0 0;...
  18.     0 0 -1 0 0 0 0 0 0 0 0 0 0 0;...
  19.     0 0 0 -1 0 0 0 0 0 0 0 0 0 0;...
  20.     0 0 0 0 -1 0 0 0 0 0 0 0 0 0;...
  21.     0 0 0 0 0 -1 0 0 0 0 0 0 0 0;...
  22.     0 0 0 0 0 0 -1 0 0 0 0 0 0 0;...
  23.     0 0 0 0 0 0 0 -1 0 0 0 0 0 0;...
  24.     0 0 0 0 0 0 0 0 -1 0 0 0 0 0;...
  25.     0 0 0 0 0 0 0 0 0 -1 0 0 0 0;...
  26.     0 0 0 0 0 0 0 0 0 0 -1 0 0 0;...
  27.     0 0 0 0 0 0 0 0 0 0 0 -1 0 0;...
  28.     0 0 0 0 0 0 0 0 0 0 0 0 -1 0;...
  29.     0 0 0 0 0 0 0 0 0 0 0 0 0 -1;...
  30.     0 0 0 0 0 0 0 0 0 0 0 1 -1 0;...
  31.     0 0 0 0 0 0 0 0 0 0 0 0 0 -1;...
  32.     0 0 0 0 0 0 0 0 0 0 0 -1 1 1;...
  33.     0 0 0 0 0 0 0 0 0 0 -1 -1 1 0;...
  34.     0 0 0 0 0 0 0 0 0 0 0 0 -1 0;...
  35.     0 0 0 0 0 0 0 0 0 0 1 1 0 0];
  36. b=[-115/180*pi;54/180*pi;241/180*pi;0/180*pi;36/180*pi;144/180*pi;-65/180*pi;191/180*pi;54/180*pi;0/180*pi;144/180*pi;36/180*pi;0;0;0;0;0;0;0;0;0;0;0;0;0;0;18/180*pi;108/180*pi;54/180*pi;0/180*pi;36/180*pi;144/180*pi];
  37. Aeq=[ 0 0 0 0 1 0 0 0 0 1 0 0 0 0];
  38. beq=[216/180*pi];
  39. [t,fval]=fmincon('my41',t0,A,b,Aeq,beq)

复制代码


困惑很久了,论文因此一直耽搁,求大神能够指点,可以发红包。

论坛优秀回答者

中级

1292 麦片

财富积分


5001500


4

主题

854

帖子

197

最佳答案
  • 关注者: 82
发表于 2019-1-27 17:44:41 | 显示全部楼层
你如果在自定义函数里面
  1. function [ f ] = my41( t )
  2. x1=t(1);
  3. x2=t(2);
  4. x3=t(3);
  5. x4=t(4);
  6. x5=t(5);
  7. x6=t(6);
  8. x7=t(7);
  9. x8=t(8);
  10. x9=t(9);
  11. x10=t(10);
  12. q = (20000*cos(x5 - (137*pi)/180)*((cos((5*pi)/36 + asin((cos(x4)*sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/(sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))*((sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))^2*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x2 - (3*pi)/2)*sin(x1))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))^2 - (40*sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*sin(x4)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x2 - (3*pi)/2)*sin(x1))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))) + 400)^(1/2))))*cos(- x5 + (5*pi)/36 + asin((cos(x4)*sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/(sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))*((sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))^2*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x2 - (3*pi)/2)*sin(x1))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))^2 - (40*sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*sin(x4)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x2 - (3*pi)/2)*sin(x1))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))) + 400)^(1/2))))*((sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))^2*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x2 - (3*pi)/2)*sin(x1))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))^2 - (40*sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*sin(x4)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))) + 400))/(2*sin(x5)) + (10*cos(x4)*sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))) - (10*sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*sin(x9 - pi/2)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))) + (cos((5*pi)/36 - asin((cos(x9)*sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/(sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))*((sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))^2*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x7 - (3*pi)/2)*sin(x6))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))^2 - (40*sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*sin(x9)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x7 - (3*pi)/2)*sin(x6))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))) + 400)^(1/2))))*cos(x10 + (5*pi)/36 - asin((cos(x9)*sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/(sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))*((sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))^2*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x7 - (3*pi)/2)*sin(x6))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))^2 - (40*sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*sin(x9)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x7 - (3*pi)/2)*sin(x6))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))) + 400)^(1/2))))*((sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))^2*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x7 - (3*pi)/2)*sin(x6))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))^2 - (40*sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*sin(x9)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))) + 400))/(2*sin(x10))) - (1274311786477943*cos((5*pi)/36 - asin((cos(x9)*sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/(sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))*((sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))^2*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x7 - (3*pi)/2)*sin(x6))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))^2 - (40*sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*sin(x9)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x7 - (3*pi)/2)*sin(x6))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))) + 400)^(1/2))))*((sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))^2*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x7 - (3*pi)/2)*sin(x6))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))^2 - (40*sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*sin(x9)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))) + 400)^(1/2))/(137438953472*sin(x10)) - (1274311786477943*cos((5*pi)/36 + asin((cos(x4)*sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/(sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))*((sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))^2*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x2 - (3*pi)/2)*sin(x1))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))^2 - (40*sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*sin(x4)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x2 - (3*pi)/2)*sin(x1))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))) + 400)^(1/2))))*((sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))^2*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x2 - (3*pi)/2)*sin(x1))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))^2 - (40*sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*sin(x4)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))) + 400)^(1/2))/(137438953472*sin(x5)) + (20000*cos(- x2 + x3 + (11*pi)/90)*sin(x4 - x5 + (23*pi)/60)*((25*sin(x1)*sin(x2 - (3*pi)/2))/sin(x1 + x2) - (sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*sin(x4 + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25))/(2*sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))))))/cos(- x2 + x3 + x4 + (11*pi)/45) - (20000*cos(- x7 + x8 + (11*pi)/90)*sin(x9 - x10 + (199*pi)/180)*((25*sin(x6)*sin(x7 - (3*pi)/2))/sin(x6 + x7) - (sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*sin(x9 + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25))/(2*sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))))))/cos(- x7 + x8 + x9 + (11*pi)/45) + (1274311786477943*sin(x4 - x5 + (23*pi)/60)*sin(x4 + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/(137438953472*sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))*cos(- x2 + x3 + x4 + (11*pi)/45)) - (1274311786477943*sin(x9 - x10 + (199*pi)/180)*sin(x9 + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/(137438953472*sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))*cos(- x7 + x8 + x9 + (11*pi)/45)) + (1274311786477943*sin(x2 - x3 - x5 + (23*pi)/36)*sin(x3 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)))*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))/(137438953472*sin(x3 + x4 + asin((5*sin(x2 - (3*pi)/2))/((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2)) + asin((10*sin(x1)*sin(x2 - (3*pi)/2))/(sin(x1 + x2)*((100*sin(x1)^2)/sin(x1 + x2)^2 - (100*cos(x2 - (3*pi)/2)*sin(x1))/sin(x1 + x2) + 25)^(1/2))))*cos(- x2 + x3 + x4 + (11*pi)/45)) + (1274311786477943*sin(x7 - x8 - x10 + (13*pi)/36)*sin(x8 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)))*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))/(137438953472*sin(x8 + x9 + asin((5*sin(x7 - (3*pi)/2))/((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2)) + asin((10*sin(x6)*sin(x7 - (3*pi)/2))/(sin(x6 + x7)*((100*sin(x6)^2)/sin(x6 + x7)^2 - (100*cos(x7 - (3*pi)/2)*sin(x6))/sin(x6 + x7) + 25)^(1/2))))*cos(- x7 + x8 + x9 + (11*pi)/45)) + (6371558932389715*sin(x1 + x2 - x3)*sin(x4 - x5 + (23*pi)/60)*sin(x1))/(68719476736*cos(- x2 + x3 + x4 + (11*pi)/45)*sin(x1 + x2 + (11*pi)/45)*sin(x1 + x2)) - (6371558932389715*sin(x6 + x7 - x8)*sin(x9 - x10 + (199*pi)/180)*sin(x6))/(68719476736*cos(- x7 + x8 + x9 + (11*pi)/45)*sin(x6 + x7 + (11*pi)/45)*sin(x6 + x7)) + (6371558932389715*sin(x4 - x5 + (23*pi)/60)*sin(x2)*sin(x3 + (11*pi)/45))/(68719476736*cos(- x2 + x3 + x4 + (11*pi)/45)*sin(x1 + x2 + (11*pi)/45)*sin(x1 + x2)) - (6371558932389715*sin(x9 - x10 + (199*pi)/180)*sin(x7)*sin(x8 + (11*pi)/45))/(68719476736*cos(- x7 + x8 + x9 + (11*pi)/45)*sin(x6 + x7 + (11*pi)/45)*sin(x6 + x7)) - (1000000*sin(x4 - x5 + (23*pi)/60)*cos(x1 + (11*pi)/90)*sin(x1)*sin(x2)*sin(x3 + (11*pi)/45))/(cos(- x2 + x3 + x4 + (11*pi)/45)*sin(x1 + x2 + (11*pi)/45)*sin(x1 + x2)) + (1000000*sin(x9 - x10 + (199*pi)/180)*cos(x6 + (11*pi)/90)*sin(x6)*sin(x7)*sin(x8 + (11*pi)/45))/(cos(- x7 + x8 + x9 + (11*pi)/45)*sin(x6 + x7 + (11*pi)/45)*sin(x6 + x7)))/((5*cos(- x2 + x3 + (11*pi)/90)*sin(x4 - x5 + (23*pi)/60))/cos(- x2 + x3 + x4 + (11*pi)/45) - (5*cos(- x7 + x8 + (11*pi)/90)*sin(x9 - x10 + (199*pi)/180))/cos(- x7 + x8 + x9 + (11*pi)/45) + (10*sin(x4 - x5 + (23*pi)/60)*sin(x3 + (11*pi)/45)*sin(x1 + (11*pi)/90))/(cos(- x2 + x3 + x4 + (11*pi)/45)*sin(x1 + x2 + (11*pi)/45)) - (10*sin(x9 - x10 + (199*pi)/180)*sin(x8 + (11*pi)/45)*sin(x6 + (11*pi)/90))/(cos(- x7 + x8 + x9 + (11*pi)/45)*sin(x6 + x7 + (11*pi)/45)));
  13. f=q;
复制代码

这样的话结果是一样的
  1. disp(fval)
  2. disp( my41(t) )

  3.   -1.1792e+12
  4.   -1.1792e+12
复制代码

新手

5 麦片

财富积分


050


3

主题

20

帖子

0

最佳答案
 楼主| 发表于 2019-1-27 19:01:31 | 显示全部楼层
TouAkira 发表于 2019-1-27 17:44
你如果在自定义函数里面

这样的话结果是一样的

为什么我把x1-x10十个变量输入到最初的q表达式中得出来的结果是不对的呢

新手

5 麦片

财富积分


050


3

主题

20

帖子

0

最佳答案
 楼主| 发表于 2019-1-31 12:31:23 | 显示全部楼层
哪位大神可以解答一下啊,可以有偿啊

论坛优秀回答者

权威

3376 麦片

财富积分



2

主题

3643

帖子

759

最佳答案
  • 关注者: 154
发表于 2019-1-31 15:05:13 | 显示全部楼层
颓小废的生活 发表于 2019-1-31 12:31
哪位大神可以解答一下啊,可以有偿啊

你是手工代入?
函数对输入的值比较敏感。
只能直接使用my41(t)。
根据显示的数值手工输入的话,可能不正确。
t1=t+rand(14,1)/1e7;
my41(t1)
已经相差很大。

新手

5 麦片

财富积分


050


3

主题

20

帖子

0

最佳答案
 楼主| 发表于 2019-2-2 23:58:24 | 显示全部楼层
maple1314168 发表于 2019-1-31 15:05
你是手工代入?
函数对输入的值比较敏感。
只能直接使用my41(t)。

是手工带入的,只能直接看答案吗,你说的直接使用my41(t)是什么意思。另外,我用fmincon中的SQP或者内点法计算的结果相差很大,且数量级都不合理,请问如何解决?感谢回帖

论坛优秀回答者

权威

9115 麦片

财富积分



11

主题

1万

帖子

1992

最佳答案
  • 关注者: 498
发表于 2019-2-3 09:00:35 | 显示全部楼层
颓小废的生活 发表于 2019-2-2 23:58
是手工带入的,只能直接看答案吗,你说的直接使用my41(t)是什么意思。另外,我用fmincon中的SQP或者内点 ...

怀疑你这模型有问题,对t的变化太敏感了。

新手

5 麦片

财富积分


050


3

主题

20

帖子

0

最佳答案
 楼主| 发表于 2019-2-11 11:24:26 | 显示全部楼层
jingzhaos 发表于 2019-2-3 09:00
怀疑你这模型有问题,对t的变化太敏感了。

是啊,我也很有疑惑,改变其中的任一参数,结果就会差距很大,差几十次方。但我按照别人的论文里的模型计算的也是这样

新手

5 麦片

财富积分


050


3

主题

20

帖子

0

最佳答案
 楼主| 发表于 2019-2-11 11:43:00 | 显示全部楼层
jingzhaos 发表于 2019-2-3 09:00
怀疑你这模型有问题,对t的变化太敏感了。

还有一个问题就是同一个参数,用fmicon里的内点法和序列二次规划法,结果也是差很多数量级

新手

5 麦片

财富积分


050


3

主题

20

帖子

0

最佳答案
 楼主| 发表于 2019-2-16 19:09:43 | 显示全部楼层
有没有大神能够指点下
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

快速回复 返回顶部 返回列表