Hi Meemai,
The message "Optimization Terminated" means that the optimization completed as normal. If you look at the value of exitflag, it should be 1. The documentation for LINPROG says that a value of 1 means "Function converged to a solution x.". So the solver converged and the resulting solution is returned in X.
I can see how the message "Optimization Terminated" can be confusing or undesirable. You can turn off this message with an options structure:
options = optimset('Display','none');
and then calling LINPROG with that structure:
[X,FVAL,exitflag,output,lambda]= linprog(c,[],[],Aeq,beq,LB,UB,[],options);
Hope that helps.
Best Answer