Defining binary number as input

조회 수: 4 (최근 30일)
Mohsen
Mohsen 2018년 12월 6일
댓글: Stephen23 2018년 12월 6일
Dear friends
There is a problem. i have an hyuristic optimization algorithm. i have to determine input dimention and its max and min.
a possible state can be
[0 1 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0]
or
[0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 0 0 0]
or....
there are four swing '1's in this vector and total possible state is equal 10626 (cobination 4 of 24). how i define number and its dimention for algorithm so that algorithm could updated randomly.
Best Regards
  댓글 수: 1
Stephen23
Stephen23 2018년 12월 6일
Mohsen's "Answer" moved here:
that is tru. but i need to define a number interval that alorithm could be abled to select a point of them randomly.then i will convert that point into a vector include 24 elements with four ''1'' in the fintness funtion section. How do i define the interval and point format?
i can not change algorithm input format and only can define number interval.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by