作业帮 > 英语 > 作业

谁有matlab,帮忙算下这题

来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/05/16 07:36:22
谁有matlab,帮忙算下这题
f = [31; 28.5; 27; 28.5;25;24;-32:-29.5;-28:-29.5;-26:-25.5];
约束方程的系数及右端项:
A=[1,0,0,0,0,0,-1,0,0,0,0,0
1,1,0,0,0,0,-1,-1,0,0,0,0
1,1,1,0,0,0,-1,-1,-1,0,0,0
1,1,1,1,0,0,-1,-1,-1,-1,0,0
1,1,1,1,1,0,-1,-1,-1,-1,-1,0
1,1,1,1,1,1,-1,-1,-1,-1,-1,-1
-1,0,0,0,0,0,1,0,0,0,0,0
-1,-1,0,0,0,0,1,1,0,0,0,0
-1,-1,-1,0,0,0,1,1,1,0,0,0
-1,-1,-1,-1,0,0,1,1,1,1,0,0
-1,-1,-1,-1,-1,0,1,1,1,1,1,0
-1,-1,-1,-1,1,-1,1,1,1,1,1,1];
b=[1200;1200;1200;1200;1200;1200;-300;-300;-300;-300;-300;0;];
lb=zeros(12,1);
[x,fval,exitflag,output,lambda] = linprog(f,A,b,[],[],lb);
结果不收敛.
Exiting:One or more of the residuals,duality gap,or total relative error
has stalled:
the dual appears to be infeasible (and the primal unbounded).
(The primal residual < TolFun=1.00e-008.)
x =
1.0e+018 *
0.0657
0.0442
0.1677
0.0401
0.0000
1.4480
0.0657
0.0442
0.1677
0.0401
0.0000
1.4480
fval =
-2.4897e+018
exitflag =
-3
output =
iterations:18
algorithm:'large-scale:interior point'
cgiterations:0
message:[1x217 char]
lambda =
ineqlin:[12x1 double]
eqlin:[0x1 double]
upper:[12x1 double]
lower:[12x1 double]