Getting Started    

Creating Movies

If you increase the number of points in the Brownian motion example to something like n = 300 and s = .02, the motion is no longer very fluid; it takes too much time to draw each time step. It becomes more effective to save a predetermined number of frames as bitmaps and to play them back as a movie.

First, decide on the number of frames, say

Next, set up the first plot as before, except using the default EraseMode (normal).

Generate the movie and use getframe to capture each frame.

Finally, play the movie 30 times.


  Animations Programming with MATLAB