PDA

查看完整版本 : 请教Matlab优化问题,恳请各位大侠援助(在线急等)


dbdubing
2008-05-28, 18:15
我用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]

dbdubing
2008-05-28, 20:43
各位高手给点意见啊,谢谢了