1
$\begingroup$

I am trying to export an animated gif to my desktop but when I do so and open it, the image doesn't move. I've tried with avi and it works.The only reason that I'm exporting as a gif is to the incorporate it into Beamer. Does avi work just as well?

Export["N:\\new.gif",ListAnimate[{a // MatrixForm, b // MatrixForm, c // MatrixForm, 
       d // MatrixForm}, 1]]

Is there anything wrong in the input for this to happen?

$\endgroup$
3
  • 1
    $\begingroup$ I'm not sure if it wil be ok, second argument for export gifs should be a list of images. You can try Rasterize/@(MatrixForm/@{a,b,c,d}). Ok, I've tried, Rasterize is redundant. Export[..., MatrixForm/@{a,b,c,d}] will work. $\endgroup$
    – Kuba
    Jan 27, 2014 at 20:35
  • $\begingroup$ How to export animation as gif - duplicate? and related source of useful links how to create animation $\endgroup$
    – Kuba
    Jan 27, 2014 at 20:41
  • $\begingroup$ I have marked this one as a duplicate since the source of the problem is now apparent. As you can see, including a self-contained example (like your recent question) is more likely to produce correct answers. $\endgroup$
    – Mr.Wizard
    Jan 30, 2014 at 14:13

2 Answers 2

3
$\begingroup$

I think that your problem cames from bad use of Export[ ].

Export's second argument must be a list, and in your code it's not.

$\endgroup$
2
$\begingroup$

Here's one possibility:

a = RandomInteger[{0, 10}, {5, 5}];
b = RandomInteger[{0, 10}, {5, 5}];
arrays = {Image[ArrayPlot[a]], Image[ArrayPlot[b]]};
Export["arrays.gif", arrays]

enter image description here

$\endgroup$

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