Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
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....

Respuesta aceptada

Walter Roberson
Walter Roberson el 25 de Abr. de 2016

Más respuestas (0)

Categorías

Más información sobre Genetic Algorithm en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by