马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
<P><FONT color=#5c44bb><STRONG><FONT size=4>为什么我输入如下确不能计算,到底错在哪里?<BR>望高手给小弟指点一二!<BR></FONT></STRONG><FONT face=System color=#000000 size=4>A=[0,0,1,1];<BR>b=[0.5];<BR></FONT><FONT face=System color=#000000 size=4>lb=[35,90,0.5,0.5]';<BR>x0=[89,162,0.85,0.72]';<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>[x,fval,exitflag,output]=fmincon(@myfun3_0,x0,A,b,[],[],lb,[],@mycon3_0,options)<BR><FONT face=宋体 color=#2b2bd5><STRONG><BR>命令窗口的提示如下:</STRONG></FONT><BR>??? Error using ==> 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 ==> d:\MATLAB6p5p1\work\myrst3_0.m<BR>On line 9 ==> [x,fval,exitflag,output]=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> |