GeneticAlgorithm:

--------------------------------------------------------------------------
   Applies a genetic algorithm to minimizing fun. 
   The initial state is x and d is a data structure containing tuning 
   parameters. This function is specifically designed to minimize functions 
   of real numbers.

   Since version 7.
--------------------------------------------------------------------------
   Form:
   [x, fBest, fPlot] = GeneticAlgorithm( fun, x, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   fun            (1,:)  Function name
   x              (m,1)  Initial state
   d              (1,1)  Data structure to pass to fun
   s              (1,1)  Data structure
                         .n            (1,1) Number of individuals
                         .nG           (1,1) Number of generations
                         .dX           (m,1) Maximum delta state
                         .fracMutation (1,1) Fraction of initial x for
                         mutations
                         .probMutation (1,1) Probability of a mutation
                         .probCrossover(1,1) Probability of a crossover

   -------
   Outputs
   -------
   x              (m,1)  Best state
   fBest          (1,1)  Best cost
   fPlot          (1,:)  Cost vs. generation

--------------------------------------------------------------------------
   Reference: Sipper, M., "A Brief Introduction to Genetic Algorithms,"
              http://www.cs.bgu.ac.il/~sipper/ga.html
--------------------------------------------------------------------------

Children:

Common: Graphics/Plot2D
Math: MathUtils/Odd