Hi, have a nice day to everyone,
I have an issue with solve this Solution can you please help me why l get Problem is unbounded.
f=[-3 -8 3];
b=[27.3,20.5,19];
A=[11,1,6;1,11,1;0,1,0];
[x,fmin] = linprog(f,A,b)
Problem is unbounded.
x =
[]
fmin =
[]

 Réponse acceptée

Matt J
Matt J le 2 Jan 2022
Modifié(e) : Matt J le 2 Jan 2022
In addition to not entering the positivity constraints x(i)>=0 and mis-typing f, you entered <= constraints instead of >= constraints.
f=[3 -8 3];
A=-[11,1,6;
1,11,1];
b=-[27.3,20.5];
lb=[0,0,0];
ub=[inf,19,inf];
[x,fmin] = linprog(f,A,b,[],[],lb,ub)
Optimal solution found.
x = 3×1
0.7545 19.0000 0
fmin = -149.7364

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by