How to add a constraint in lsqonlin minimization?
Mostrar comentarios más antiguos
In the optimization problem below, I obtain a (1x5) vector x. I want to put the following additional constraint : 2*x(2)*x(3)>x(4)^2, such that the obtained vector x satisfies this constraint. Does someone knows how to do this? Help is very much appreciated.
x0=[.5, 50, .5, .5, 0];
lb = [0, 0, 0, 0, -1];
ub = [1, 100, 1, 1, 1];
x = lsqnonlin(@fun,x0,lb,ub);
Respuestas (1)
Alan Weiss
el 18 de Jun. de 2015
0 votos
For that kind of nonlinear constraint, use fmincon instead of lsqnonlin. See the Optimization Decision Table.
Alan Weiss
MATLAB mathematical toolbox documentation
Categorías
Más información sobre Choose a Solver en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!