フィルターのクリア

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 Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by