Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want to export a list of matrices as a gif so that they will appear one after another 2 seconds apart. Ive tried the following but when I open it up it only does the first two matrices, I have 10 altogether.

list = MatrixForm /@ {{{0.3333, 0, 0}, {0, 0.3333, 0}, {0, 0,0.3333}}, {{0.04466, 0, 0}, {0, 0.3333, 0}, {0, 0, 0.622}}, {{0.05954, 0, 0}, {0, 0.8293, 0}, {0, 0,0.1111}}, {{0.1163, 0, 0}, {0, 0.8681, 0}, {0, 0,0.01558}}, {{0.01707, 0, 0}, {0, 0.9511, 0}, {0, 0, 0.03185}}, {{0.01707, 0, 0}, {0, 0.9511, 0}, {0, 0, 0.03185}}, {{0.001264, 0, 0}, {0, 0.9811, 0}, {0, 0, 0.01761}}, {{0.0006892, 0, 0}, {0, 0.998, 0}, {0, 0, 0.001286}}, {{0.0006901, 0, 0}, {0, 0.9993, 0}, {0, 0, 0}}, {{0, 0, 0}, {0, 1, 0}, {0, 0, 0}}};

Export["N://presentation28.gif", list, "DisplayDurations" -> 3]
share|improve this question
    
It is working ok on Win7 V9.0.1.0. –  Kuba Jan 30 at 12:03
    
Im using it on the university desktop and not sure what they run. –  user32462 Jan 30 at 12:06
    
Try $Version. –  Kuba Jan 30 at 12:14
    
Sorry what does that mean? –  user32462 Jan 30 at 12:21
1  
7.0 mathematica on windows 7 –  user32462 Jan 30 at 13:45

1 Answer 1

It appears that Export to "GIF" in Mathematica 7 fails (with a corrupt file) if the image frames (source elements) are not all the same size. I'm surprised I don't remember this problem, but then again I don't remember a lot of things these days. Anyway, a hackish solution for now:

bbox = MapThread[Max, Rasterize[#, "RasterSize"] & /@ list];

list2 = ImageCrop[Rasterize[#], bbox, Padding -> White] & /@ list;

Export["A://zod.gif", list2, "DisplayDurations" -> 3]

enter image description here

share|improve this answer
    
Thanks, it works perfectly!! –  user32462 Jan 30 at 14:06
    
@user32462 Glad I could help! :-) Please consider Accepting this answer after a while, unless someone posts a better one. –  Mr.Wizard Jan 30 at 14:11

Your Answer

 
discard

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.