写了一下,是下面的结果,应该是对的,呵呵!
>> f=[25;30];
A=[2 3;3 4];
b=[69;48];
lb=[4;2];
[x,fval,exitflag,output]=linprog(f,[],[],A,b)
Optimization terminated.
x =
-132.0000
111.0000
fval =
30.0000
exitflag =
1
output =
iterations: 4
algorithm: 'large-scale: interior point'
cgiterations: 0
message: 'Optimization terminated.'
constrviolation: 6.7928e-011
线性规划问题用linprog求解