function F = Fun(x);
F = [-3*x(1)-x(2),
-x(1)-2*x(2)];
a = [1 1
1 0
0 1];
b = [7,5,5];
c1 = [-3 -1];
c2 = [-1 -2];
[x1,g1] = linprog(c1,a,b,[],[],zeros(2,1));
[x2,g2] = linprog(c2,a,b,[],[],zeros(2,1));
g3 = [g1;g2];
[x,fval] = fgoalattain('Fun',rand(2,1),g3,abs(g3),a,b,[],[],zeros(2,1))
想解决的问题如下: