Solution of Linear Programming Problems with Matlab

1 view (last 30 days)
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 =
[]

Accepted Answer

Matt J
Matt J on 2 Jan 2022
Edited: Matt J on 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

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!