How to set 2 constrain bounds at the same time?

조회 수: 4 (최근 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];

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by