MATLAB: How to make video file from a set of plots in Matlab

figureMATLABvideo

In a for loop, a number of 3200 figures are created. How can I save those plots as a video file in Matlab 2016b? In fact, there are some posts and questions in the net also in MathWorks, but those could not help me.

Best Answer

There are a couple of different ways depending on your graphics.
One way is to use getframe() to take a snapshot of the display; that frame can then be written to a video file.
Another way is to imwrite() of print() or saveas() to a file, and then later to run through reading all of the files and adding the images to a video file.
Related Question