How to set 2 constrain bounds at the same time?

1 Ansicht (letzte 30 Tage)
Christos Tsallis
Christos Tsallis am 14 Sep. 2020
Kommentiert: Christos Tsallis am 14 Sep. 2020
Hello,
let's say that we have -10<=X1<=10 and -30<=X2<=30. My question is, how can we express this in matlab or in the ga-Solver?
I tried in ga-Solver and as a Lower Bound I typed "-30*ones(1,1);-10*ones(1,1);" and as an Upper Bound "30*ones(1,1);10*ones(1,1);"
Is this logic correct?
Thanks for your time, I really appreciate your help.

Akzeptierte Antwort

Matt J
Matt J am 14 Sep. 2020
lb=[-10,-30];
ub=[+10,+30];

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by