How can i plot a graph of one of the parameters vs no. of iterations in Genetic algorithm optimization technique??

I am using GA toolbox...i now need to plot a graph which will show one of the parameter values for each iteration vs no. Iterations...can anyone help me out??

Answers (1)

Use a plot function. If none of the built-in functions are suitable, then write a custom plot function in the appropriate syntax.
Alan Weiss
MATLAB mathematical toolbox documentation

2 Comments

I want to use one of the parameters that i am using can you show me how can i write such function?? An example code might help...pls
Sorry, I should have said before that you can just edit one of the existing plot functions such as gaplotbestindiv or gaplotbestf, save it with a different name, and use it as a plot function.
Remember, ga has a population, so at each iteration (generation) there are many individuals. You will have to decide which, if any, to plot.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

Tags

Asked:

on 2 Sep 2015

Commented:

on 2 Sep 2015

Community Treasure Hunt

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

Start Hunting!