MATLAB: Saving intermediate population during GA

genetic algorithmGlobal Optimization ToolboxintermediateMATLABoptimizationOptimization Toolboxpopulationsavetext file

I need some help to find out a way to store the information related to every generation of the GA
(both the variable and the fitness values)
It could be both on an external file ( e.g. in a .txt file) or in a struct array.
Which one do you suggest? And how can I do it?
Thanks in advance

Best Answer

You can save whatever you like using an output function. For examples of output functions (using a different syntax, be careful, GA uses its own), see a MATLAB example, and an Optimization Toolbox example.
Alan Weiss
MATLAB mathematical toolbox documentation