Trying to solve for the extreme points and maximum value for a function using linprog when the optimum solution is not unique?

i have the following function:The maximum value is indeed correct, however i should get two extreme points in which the range is x. the coordinates should be from (187.5,125) and (0,200). Is there something i can do to change the program settings:
>> f=-[40 100];
>> A=[10 5;4 10;1 1.5];
>> b=[2500;2000;450];
>> lb=[0;0];
>> ub=[inf;inf];
>> [x,z]=linprog(f,A,b,[],[],lb,ub)
Optimization terminated.
x =
174.5904
130.1638
z =
-2.0000e+04

Answers (2)

You can try changing f a little bit and seeing how that changes the answers. Then use the original f to examine the resulting solutions and seeing if they are indeed equal.
f1 = [39.99,100];
x1 = linprog(f1,A,b,[],[],lb,ub);
f2 = [40.01,100];
x2 = linprog(f2,A,b,[],[],lb,ub);
fval1 = f*x1(:);
fval2 = f*x2(:);
Alan Weiss
MATLAB mathematical toolbox documentation

Asked:

N B
on 17 Mar 2017

Edited:

on 17 Mar 2017

Community Treasure Hunt

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

Start Hunting!