Maximize Linear Programming using linprog - returns absurd results
7 views (last 30 days)
Show older comments
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.
1 Comment
Answers (0)
See Also
Categories
Find more on Calculus 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!