What is a appropriate method to maximize function subject to nonlinear equality constraint? can we use fmincon?
13 views (last 30 days)
Show older comments
Chan Heng
on 24 Dec 2015
Commented: Walter Roberson
on 25 Dec 2015
I want to maximize a function subject to nonlinear equality constraint, I wonder that fmincon can use with this problem or not? as we know fmincon is used to minimize the functions.
0 Comments
Accepted Answer
Walter Roberson
on 24 Dec 2015
Yes, you can use a nonlinear constaint; see http://www.mathworks.com/help/optim/ug/fmincon.html#inputarg_nonlcon
0 Comments
More Answers (1)
Alan Weiss
on 24 Dec 2015
Perhaps Walter's answer satisfied you, but it seems to me the question was how to maximize rather than minimize a function, subject to nonlinear constraints. The documentation describes how to maximize: all you do is minimize the negative of your objective function. See the documentation for details.
Alan Weiss
MATLAB mathematical toolbox documentation
1 Comment
Walter Roberson
on 25 Dec 2015
I missed that, but yes, this is what should be done to maximize a function.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!