How can I capture video from a plotting function?

2 views (last 30 days)
I am running a multi objective genetic algorithm using the command:
[vals,fvals]=gamultiobj(@MultiObj,4,[],[],[],[],lb,ub,Options)
where @MultiObj is my function, using 4 variables, lb=lower bound, ub=upper bound, and Options are specified as:
Options=gaoptimset('PlotFcns',@gaplotpareto);
This works great and produces a nice plot that updates with each generation, for my problem this is around 50 times. Is there any way to record this plot as it updates? I have no idea what is going on inside gaplotpareto. I was thinking F = getframe(h) might work, but I don't know how to update the frame or get the handle.
Thank you in advance for your help!
Richard

Answers (0)

Community Treasure Hunt

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

Start Hunting!