how do i increase the maximum number of iterations for linprog?
5 views (last 30 days)
Show older comments
Since it says to increase options.MaxIter. I did:
OPTIONS=optimset('MaxIter',10000);
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA]=linprog(c,A,b,Aeq,beq,LB,UB,OPTIONS)
Then i get erros message as:
Error using linprog (line 144)
LINPROG requires the following inputs to be of data type double: 'X0'.
Error in main_compositeSystem (line 134)
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA]=linprog(c,A,b,Aeq,beq,LB,UB,OPTIONS);%,OPTIONS.MaxIter);
Turns out, linprog doesnot allow to set options??
0 Comments
Answers (1)
John D'Errico
on 25 Jun 2017
Edited: John D'Errico
on 25 Jun 2017
Linprog DOES allow you to set options if you pass them in properly.
READ THE ERROR MESSAGE.
linprog has a problem with the variable X0, or what you passed in as X0.
The argument list for linprog expects X0 as the next argument after UB to be X0.
You passed in a structure in that argument.
If you don't intend to pass in a variable, such as X0, then pass in an empty array [] as a placeholder.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!