How to set 2 constrain bounds at the same time?

1 回表示 (過去 30 日間)
Christos Tsallis
Christos Tsallis 2020 年 9 月 14 日
コメント済み: Christos Tsallis 2020 年 9 月 14 日
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.

採用された回答

Matt J
Matt J 2020 年 9 月 14 日
lb=[-10,-30];
ub=[+10,+30];
  1 件のコメント
Christos Tsallis
Christos Tsallis 2020 年 9 月 14 日
appreciate it ! thank you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by