Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
初级会员
注册日期: 2008-05-05
年龄: 20
帖子: 6
声望力: 0 ![]() |
![]()
我用Matlab优化工具箱中的fminunc函数来求解一个无约束的二元函数的极小值,运行后发现算出的结果就是我所给的初值,多次修改初值发现结果始终就是初值。就是说Matlab就没进行优化,程序代码如下,恳请各位高手给予指点,万分感谢!(Matlab版本7.1)
目标函数: function y=chexiaolirun_objfun(x) y=( 10+(-150+ 7*(x(1)^ 1.5)*(x(2)^ 1.2)* 50))/( 56/(x(1)*x(2))+ 7*(x(1)^ 1.5)*(x(2)^ 1.2)* 2+ 2)+ 0.05/(-x(1)+ 1.88)+ 0.05/(x(1)- 263)+ 0.05/(-x(2)+ .08)+ 0.05/(x(2)- 1.59); 主函数: x0=[ 237, 1.272]; options=optimset('largescale','off'); [x,fval,exitflag,output]=fminunc('chexiaolirun_objfun',x0,options) 运行结果: Line search cannot find an acceptable point along the current search direction. x = 237.0000 1.2720 fval = 24.7958 exitflag = -2 output = iterations: 1 funcCount: 198 stepsize: [] firstorderopt: 0.4565 algorithm: 'medium-scale: Quasi-Newton line search' message: [1x80 char] |
![]() |
![]() |
![]() |
#2 |
初级会员
注册日期: 2008-05-05
年龄: 20
帖子: 6
声望力: 0 ![]() |
![]()
各位高手给点意见啊,谢谢了
|
![]() |
![]() |