I am having some problems with writing an output function for genetic algorithm in Matlab global optimization toolbox.
I want to create a function that stores all state.Population (each individual) of each generation.
Here is what i know:
Output functions are functions that the genetic algorithm calls at each generation.
The output function has the following calling syntax.
[state,options,optchanged] = myfun(options,state,flag,interval)
From http://www.mathworks.com/help/releases/R2010b/toolbox/gads/f6174dfi10.html#f17837
Where state contains useful data of the current generation.
Here is what i've tried:
Create a function with a different output than [state,options,optchanged]. The output is a global matrix that stores every state.Population