Maximize Linear Programming using linprog - returns absurd results
조회 수: 8 (최근 30일)
이전 댓글 표시
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.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!