While implementing genetic algorithm for finding the global minimum for a variable 'y' (which depends upon both x and z), I want to optimise only x and not z. I want to input z from the main code and pass it to my fitness function. Can this be done?
Mostrar comentarios más antiguos
function y=myFitness(x,z) y=(z^2)*x(1)+ 4*x+ z*x(2)^5; end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Genetic Algorithm en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!