|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
>> fun='(x(3)-4.18)^2+(x(4)-12.62)^2';
a=[-1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1];
b=[0 -6 0 0];
aeq=[-1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0];
beq=[0 17.23 0 0];
x0=[0 6 1-1];
[x,fval,exitflag]=fmincon(fun,x0,a,b,aeq,beq)
Warning: Large-scale (trust region) method does not currently solve this type of problem,
switching to medium-scale (line search).
> In fmincon at 274
Optimization terminated: first-order optimality measure less
than options.TolFun and maximum constraint violation is less
than options.TolCon.
Active inequalities (to within options.TolCon = 1e-006):
lower upper ineqlin ineqnonlin
2
x =
11.2300
6.0000
1.3950
9.8350
fval =
15.5124
我是新手,请问用matlab计算出的这个结果是最优解吗?
warning是啥意思啊!
[ 本帖最后由 eight 于 2008-1-9 11:19 编辑 ] |
|