Maximize Linear Programming using linprog - returns absurd results

8 visualizaciones (últimos 30 días)
Hardik Mahipal Surana
Hardik Mahipal Surana el 8 de Abr. de 2020
Comentada: Torsten el 8 de Abr. de 2020
I have to maximize the function given below: f(x,y, z) = 10x + 8y + 5z; subject to
x + 2y + 2z <=1600;
3x + 2y + z <= 600;
x>=0;
y>=0;
z>=0;
I tried to find out the value using linprog() function:
f = [-10 -8 -5]
A = [1 2 2; 3 2 1]
b = [1600 600]
linprog(f, A, b)
But i am getting some absurd values:
X =
1.0e+03 *
-0.5000
1.0500
0
val =
-3.4000e+03
Where did i go wrong? Any help would be really appreciated.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by