Hi
I have written my optimization problem in Matlab. The problem has 10 variables, such as x(i), i=1,2...10.
But there is a restriction that x(i) either zero or one.
How can I set these constratints in MATLAB.
Greatly appreciate your help.
Rizvi

답변 (1개)

John D'Errico
John D'Errico 2020년 11월 12일

0 개 추천

You have 10 variables, which can take on only 2 levels each. Just evaluate the function at all 2^10 = 1024 points and be done with it.

카테고리

도움말 센터 및 File Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

질문:

2020년 11월 12일

답변:

2020년 11월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by