Posted By:
4 Aug, 2013 2:44 pm PDT

interior point solver in Matlab

How can I solve a linear programming problem (LP) in Matlab?
Linear programming (LP) has linear objective function and linear constraints.
eg.


minimize: x+y
subject to:

x>1
y-x>5
y+x>3

Thanks.

Attachment:None


The objective function should be maximize instead of minimize:

f = [-1; -1]; %objective function
A = [0 1;1 -1; 1 1]; %linear constraints on the left side
B = [-1;-5;-3];% right side of linear constraints
%A*[y;x]<B
solution= linprog(f,A,B)

OUTPUT:
Optimization terminated. solution = -6.0000 -1.0000

Was it useful?  




Please login to reply to this problem.