% Exemplo do ponto interior
% Edgar & Himmelblau, 1988
% 
%  min c'x 
%      A x = b
%       x >= 0

c=[1; 2; 3];
Aeq=[1  1  1];
beq=1;
lb=zeros(3,1);
x0=[0; 0; 0]; % inviavel

% active set: simplex
op=optimset('LargeScale','off','Display','final');
[x,S,eflag,out,lambda]=linprog(c,[],[],Aeq,beq,lb,[],x0,op)

% interior point: S. Mehrotra, 1992
op=optimset('LargeScale','on','Display','iter','MaxIter',100,'TolFun',1e-4);
[xi,Si,eflagi,outi,lambdai]=linprog(c,[],[],Aeq,beq,lb,[],[],op)
