setting a vector sum as a lower and upper bound in fmincon
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I would like to set a constraint for the optimization problem to be solved by fmincon so that the vector, x, of solution values has values that sum between two scalar values. Is there a way to do this?
0 Commenti
Risposte (1)
Titus Edelhofer
il 21 Lug 2011
Hi,
yes there is: add to the matrix "A" (inequalities) two lines
A = [ones(1, length(x)); -ones(1, length(x))];
and for the right hand side take the upper and lower bound
b = [upperBound; -lowerBound];
Titus
0 Commenti
Vedere anche
Categorie
Scopri di più su Nonlinear Optimization in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!