Effacer les filtres
Effacer les filtres

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

3 vues (au cours des 30 derniers jours)
Elysi Cochin
Elysi Cochin le 25 Avr 2016
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....

Réponse acceptée

Walter Roberson
Walter Roberson le 25 Avr 2016

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by