Linear programming with complex inequalities

I just wanna solve:
min Z=20X+18Y
with
2X+3Y>=10
4X+7Y>=28
X>=0, Y>=0
Answer is X=0, Y=4 and Z=72 How can i use the linprog command but with >= inequalities?

 Accepted Answer

Multiply the >= inequalities by (-1).
Best wishes
Torsten.

4 Comments

I know that but it doesnt work
Please show your code.
Best wishes
Torsten.
f=[-20 -18]
A=[-2 -3;-4 -7]
B=[-10 -28]
Aeq=[];
beq=[];
lb=[0 0];
ub=[];
[x,fval,exitflag,output]=linprog(f,A,B,Aeq,beq,lb,ub)
f=[20 18]
Best wishes
Torsten.

Sign in to comment.

More Answers (0)

Asked:

on 14 Jun 2017

Commented:

on 14 Jun 2017

Community Treasure Hunt

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

Start Hunting!