Solution of Linear Programming Problems with Matlab

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 =
[]

 채택된 답변

Matt J
Matt J 2022년 1월 2일
편집: Matt J 2022년 1월 2일
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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2022년 1월 2일

댓글:

2022년 1월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by