clc
f=[-2;-3;-1];
a = [-2,5,-1;1,3,1];b = [-10;12];
aeq = [1,1,1];
beq = 7;
[x,y] = linprog(f,a,b,aeq,beq,zeros(3,1));
x,y = -y
司守奎数学建模与算法编程实例
最新推荐文章于 2024-03-12 23:26:16 发布
clc
f=[-2;-3;-1];
a = [-2,5,-1;1,3,1];b = [-10;12];
aeq = [1,1,1];
beq = 7;
[x,y] = linprog(f,a,b,aeq,beq,zeros(3,1));
x,y = -y