5.0

5.0 | 2 ratings Rate this file 214 downloads (last 30 days) File Size: 259.35 KB File ID: #21944

Animated GIF

by Robert Bemis

 

30 Oct 2008

Code covered by BSD License  

How to generate an animated GIF from MATLAB

Download Now | Watch this File

File Information
Description

This example animates the vibration of a membrane, captures a series of screen shots, and saves the animation as a GIF image file. The animated GIF is also embedded in an HTML page via the published M-File.

Acknowledgements
This submission has inspired the following:
3-D DataViz Contest Animation
Required Products Image Processing Toolbox
MATLAB release MATLAB 7.7 (R2008b)
Zip File Content  
Published M Files How to make an animated GIF
Other Files AnimatedGif.m,
DancingPeaks.gif,
html/AnimatedGif.png,
html/AnimatedGif_01.png
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
31 Oct 2008 Anders Brun

Nice example! You can add anti-aliasing too if you download the Myaa tool and replace every

    f = getframe;

with
    h = myaa;
    f = getframe;
    close(h);

Thanks,
Anders

02 Nov 2008 Robert Bemis

Anders, interesting suggestion. Thanks!

09 Jul 2009 Luca Cerone

That's almost what I was looking for..
I just wonder how can I display also xlabel, ylabel
and title, and the values on the axis.
Any Idea???
Thank you very much by the way :)

09 Jul 2009 Robert Bemis

Luca, see the help for GETFRAME. The optional arguments are what you need. :)

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
image processing Robert Bemis 30 Oct 2008 14:42:42
data export Robert Bemis 30 Oct 2008 14:42:42
simulation Robert Bemis 30 Oct 2008 14:42:42
animation Robert Bemis 30 Oct 2008 14:46:53
gif Robert Bemis 30 Oct 2008 14:46:57
image Robert Bemis 30 Oct 2008 14:47:01
tutorial Robert Bemis 04 Nov 2008 09:00:10
animation Cristina McIntire 07 Nov 2008 12:52:27
data export Cristina McIntire 10 Nov 2008 10:48:51
image processing Cristina McIntire 10 Nov 2008 10:48:55
data import Cristina McIntire 10 Nov 2008 11:02:24
animation Yang Kuiyuan 15 May 2009 23:13:00
image processing A 07 Jun 2009 08:50:03
gif A 07 Jun 2009 08:50:10
animation A 07 Jun 2009 08:50:13
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com