How to store every iteration points of GA in m-file?

4 views (last 30 days)
Hello Sir, I am new to MATLAB and currently I am performing GA to get nonlinear constrained global minimization.I wrote the code and its running perfectly. But I want to save all Iteration points on mat files so that i can compare between them. I know a custom output function can serve the purpose but i can't do it. So, plz provide me some documentation or code so that i can do the desirable.
thank you,

Answers (1)

Adam
Adam on 9 Mar 2015
seems to be the output argument you need. I don't have the optimisation toolbox myself, but that appears to store the output from each generation of the algorithm.
If you wish to save that to a mat file or just use it straight away in your code is up to you, but I don't think you need to do anything fancy for saving per iteration, just get all iteration outputs at once and use those.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!