TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that you can implement movies into your LaTeX document, but I wanted to know is there a way to implement moving graphics after source code is compiled in Matlab?

This questions can really become a wiki and can be broadened to other systems such as: Maple, Mathematica, and so on.

share|improve this question
Which kind (file format) of graphics do you have in mind? – AlexG Oct 6 '11 at 14:22
Not quite sure, I have a .m file, and I have written up some code and plotted the results all with a for loop. So, the plots are constantly being updated with array values and this makes the plots moves in the figure window when the file is ran until the array within the for loop has reached the max value. How could I get the graphics to move with the same behavior in a (La)Tex document. Maybe for a better visualization, here is a example of what the graphics do below. en.wikipedia.org/wiki/Convolution – night owl Oct 7 '11 at 9:03
up vote 1 down vote accepted

The animate package should do the job. It is assumed that the PDF frames are inside one big PDF document, one frame per page. Here is an example:

% playing at 12 frames per second

There is a dedicated tutorial showing how to include a series of PDF frames generated by any software including Matlab. The tutorial is targeted to graphics produced by TikZ using an intermediate PDF file.

There are some nice examples that show animated plots drawn by TikZ, including one that demonstrates convolution.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.