필터 지우기
필터 지우기

avoid repetition of value in genetic algorithm output....

조회 수: 3 (최근 30일)
Elysi Cochin
Elysi Cochin 2016년 4월 25일
답변: Walter Roberson 2016년 4월 25일
I did a genetic algorithm code as below...
lb = [1 1 1 1 1 1 1 1 1 1];
ub = [10 10 10 10 10 10 10 10 10 10];
intCon = 1:10;
[x,fval] = ga(FitnessFunction,10,[],[],[],[],lb,ub,[],intCon,options)
I get output "x" as a vector of size [1 10] for example as follows...
(my output eg:) x = 4 3 3 2 9 4 4 6 1 1
but i need to get a output as example,
(what i want eg:) x = 2 10 3 8 1 6 4 9 5 7
that is i should not get repeated values and my outputx should be if size [1 10] .... but in my output i get repeated values... please can someone tell me how to remove repetition... should i set any options for that,.... please do reply....

채택된 답변

Walter Roberson
Walter Roberson 2016년 4월 25일

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by