MATLAB Answers

How to create a video of fmincon results for each iteration?

2 views (last 30 days)
Ahmed Ghamdi
Ahmed Ghamdi on 7 Dec 2019
Answered: J. Alex Lee on 7 Dec 2019
Hi,
I have used fmincon to find solution for an optimization problem. I want to create a video plot showning how a plot of a function being calculated everytime fmincon changes the optimization variables values. Any idea how? See the attached pictures for illustration.
Thanks,
Ahmed

  0 Comments

Sign in to comment.

Answers (1)

J. Alex Lee
J. Alex Lee on 7 Dec 2019
Since it looks like you already are able to plot, is the question simply how to create a video from series of plots?
If so, a simple way to do eveyrthing within matlab is to use getframe() and videoWriter

  0 Comments

Sign in to comment.

Sign in to answer this question.