Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

linear programming in matlab

조회 수: 1 (최근 30일)
maryam
maryam 2013년 10월 7일
마감: MATLAB Answer Bot 2021년 8월 20일
Dear all
excuse me , i have a problem of linear programming and my problem don't have bound and i'm trying for answer to it but my solution in matlab does not give an accurate answer,
the answer for problem must be as follows:
0.5,0.5,0.5,0.33
can any one help me for it ??
my problem :
MAX = 1 * C-1*D;
1 * A + 3* B +1 * C <= 2.5;
4 * A +1 * C <= 2.5;
1 * A +3 * B - 0.75 * D <=-0.75+2.5;
4 * A - 0.75*D <=- 0.75+2.5;
1 * A + 1 * B =1;
1* C +1*D <=1;
and my code in matlab is :
f=[0; 0; -1 ; 1]
A=[1 3 1 0 ;
4 0 1 0;
1 3 0 -0.75;
4 0 0 -0.75;
1 1 0 0;
0 0 1 1;];
b = [2.5;2.5;1.75;1.75;1;1];
x=linprog(f,A,b)
Thanks so much and Best

답변 (1개)

Matt J
Matt J 2013년 10월 7일
편집: Matt J 2013년 10월 7일
You're clearly missing constraints, if you are supposed to get
0.5,0.5,0.5,0.33
as an answer.

이 질문은 마감되었습니다.

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by