how do i increase the maximum number of iterations for linprog?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
John D'Errico
le 25 Juin 2017
Modifié(e) : John D'Errico
le 25 Juin 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 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!