optimization: constraint (how to state 0<x<1)
19 views (last 30 days)
Show older comments
Hi all
I am following http://www.mathworks.com/help/optim/ug/nonlinear-equality-and-inequality-constraints.html
In this problem, we minimize an objective function using fmincon.
In particular, I have a question about the constraint. If I want to state that:
x(1)>0, 0<=x(1)<=1
How do I use specify this in matlab's language?
0 Comments
Answers (1)
John D'Errico
on 25 Aug 2014
These are simple bound constraints. Use the upper and lower bounds that fmincon offers. (READ THE HELP!)
Alternatively, you could just recognize that those constraints are simply
x(1) >= 0
x(1) <= 1
and supply them as linear inequality constraints.
0 Comments
See Also
Categories
Find more on Nonlinear Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!