Setting up the fminunc function
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
ektor
le 25 Déc 2017
Réponse apportée : Star Strider
le 25 Déc 2017
Dear all I want to maximize a function, where the univariate unknown, x, with respect to which the maximization takes place is bound between -1 and 1. This is the only constraint. So, I use this
[xx,fval,exitflag,output,lambda,grad,HH]=fmincon('sfunction',x0,...
[],[],[],[],-1,1,[], options,...);
My question is if the set up
[],[],[],[],-1,1,[]
inside the fmincon function is the correct one.
0 commentaires
Réponse acceptée
Star Strider
le 25 Déc 2017
‘My question is if the set up ... inside the fmincon function is the correct one.’
As I read the documentation, yes, it is, except for the ‘...’ after your ‘options’ call. I have not experimented with something like your code, but the extra ellipsis at the end of the argument list could throw an error. Try it and find out.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!