Genetic Algorithm and Direct Search Toolbox Previous page   Next Page

Vectorize Option

The genetic algorithm usually runs faster if you vectorize the fitness function. This means that the genetic algorithm only calls the fitness function once, but expects the fitness function to compute the fitness for all individuals in the current population at once. To vectorize the fitness function,

The following comparison, run at the command line, shows the improvement in speed with Vectorize set to On.


Previous page  Using a Hybrid Function Using Direct Search Next page

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS