lovewft 发表于 2006-4-17 22:45

[求助]高手进来看看哪里错了(优化问题)

<P><FONT color=#5c44bb><STRONG><FONT size=4>为什么我输入如下确不能计算,到底错在哪里?<BR>望高手给小弟指点一二!<BR></FONT></STRONG><FONT face=System color=#000000 size=4>A=;<BR>b=;<BR></FONT><FONT face=System color=#000000 size=4>lb=';<BR>x0=';<BR>options=optimset('largescale','off','display','iter');<BR>options=optimset(options,'tolx',1e-4);<BR>options=optimset(options,'tolfun',1e-6);<BR>options=optimset(options,'maxiter',200);<BR>=fmincon(@myfun3_0,x0,A,b,[],[],lb,[],@mycon3_0,options)<BR><FONT face=宋体 color=#2b2bd5><STRONG><BR>命令窗口的提示如下:</STRONG></FONT><BR>??? Error using ==&gt; fmincon<BR>FMINCON cannot continue because user supplied nonlinear constraint function<BR> failed with the following error:</FONT></FONT></P>
<P><FONT color=#5c44bb size=4><FONT face=System color=#000000>One or more output arguments not assigned during call to 'feval'.</FONT></FONT></P>
<P><FONT color=#5c44bb size=4><FONT face=System color=#000000>Error in ==&gt; d:\MATLAB6p5p1\work\myrst3_0.m<BR>On line 9==&gt; =fmincon(@myfun3_0,x0,A,b,[],[],lb,[],@mycon3_0,options)</FONT></FONT><FONT color=#5c44bb size=4><FONT face=System color=#000000></FONT></FONT></P>

lovewft 发表于 2006-4-17 22:46

欢迎高手进来指点!

happy 发表于 2006-4-18 08:36

回复:(lovewft)[求助]高手进来看看哪里错了(优化问...

<FONT face=System size=4>myfun3_0,mycon3_0这两个函数的函数名是否和你存储的文件名一致?</FONT>

lovewft 发表于 2006-4-19 11:44

myfun3_0,mycon3_0这两个函数的函数名是否和你存储的文件名一致?

<P>是的!<BR></P>

lovewft 发表于 2006-4-19 11:45

到底我这是错在哪了???

lovewft 发表于 2006-4-19 13:08

<P>解决了!是<STRONG>mycon3_0</STRONG>里面的ceq=[];没写进去!<BR>谢谢大侠的关心!</P>
页: [1]
查看完整版本: [求助]高手进来看看哪里错了(优化问题)