GA Toolbox maximization fucntion
2 views (last 30 days)
Show older comments
there is a Genetic algorithm toolbox. in which the ranking function is only aiming for the minimization of the fitness function i need to find a ranking function which aim for the maximization of the fitness function ....
0 Comments
Accepted Answer
Sean de Wolski
on 29 Dec 2014
maxfcn = @(x)-minfcn;
Just negate the min function!
3 Comments
Sean de Wolski
on 30 Dec 2014
The minima of the negation will be the maxima. What you have above looks right to me.
More Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!