4.75

4.8 | 4 ratings Rate this file 161 downloads (last 30 days) File Size: 354.83 KB File ID: #16037

ANIMATOR - animate data

by Jiro Doke

 

21 Aug 2007 (Updated 28 Nov 2007)

Code covered by BSD License  

This GUI tool allows you to animate your data with controls for playback speed and looping.

Editor's Notes:

This was a File Exchange Pick of the Week

Download Now | Watch this File

File Information
Description

This GUI tool allows you to animate your data with controls for playback speed and looping.

The controls allows you to speed up and slow down (or reverse) the playback. You can pause at any time. You can also drag the time line bar to go to arbitrary frames. Also, use the arrow keys to move between frames (left or right) or change the speed (up or down). Spacebar pauses/starts the animation. In addition to the animation speed, the animation frame interval rate can be set from the menu.

The animation can be exported to an AVI or an Animated GIF (from the menu).

ANIMATOR(X, Y) animates the data. The data has to be in one of the following formats. The general form is a 3-D array. 1st dimension is the numbe of elements in a signal (m). 2nd dimension is the number of lines (n). 3rd dimension is the number of frames (p).

ANIMATOR(X, Y, PARAM1, VALUE1, ...) accepts additional arguments:
  'axis' : {'auto'}, 'equal
  'xlim' : 'auto', [XMIN, XMAX].
  'ylim' : 'auto', [YMIN, YMAX].
  'title' : <title text>
  'xlabel': <xlabel text>
  'ylabel': <ylabel text>
  'smooth': {'off'}, 'on'. Anti-aliasing

Example:
x = (0:.01:10)';
y = nan(length(x), 2, 400);
for idx = 1:400;
  y(:,1,idx)=sin(2*x)+cos(0.25*sqrt(idx)*x);
  y(:,2,idx)=-cos(0.7*x)+sin(0.4*sqrt(idx)*x);
end
animator(x, y);

*NOTE 1* R14SP2 or later is needed for exporting to Animated GIFs.
*NOTE* This current version requires the Image Processing Toolbox for exporting to Animated GIFs. This is because it is calling "rgb2ind" for converting RGB to indexed image. A future enhancement will be to create a MATLAB-only solution.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.4 (R2007a)
Other requirements This was created in R2007a, but it should work on R14 or later. The m-file requires the "animatorIcons.mat" included in the ZIP file.
Zip File Content  
Other Files animator/animator.m,
animator/animatorIcons.mat,
animator/animatorSampleData.mat
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
29 Aug 2007 Scott Hirsch

Brilliant! Jiro scores again.

10 Sep 2007 bibin mathew  
30 Mar 2008 Harris Ahmed

Needs description of how to make it work

02 Jul 2009 Paul Foxgrover

This is a great program. Very helpful!!!!! Thank you!!!

11 Jul 2009 Ahmet Mert

woow amazing! thanks

02 Nov 2009 James  
Please login to add a comment or rating.
Updates
28 Nov 2007

Added capability to export to AVI and animated GIF (R14SP2 or later)

Tag Activity for this File
Tag Applied By Date/Time
data exploration Jiro Doke 22 Oct 2008 09:23:48
animate Jiro Doke 22 Oct 2008 09:23:48
movie Jiro Doke 22 Oct 2008 09:23:48
visualize Jiro Doke 22 Oct 2008 09:23:48
gui Jiro Doke 22 Oct 2008 09:23:48
handle graphics Jiro Doke 22 Oct 2008 09:23:48
frames Jiro Doke 22 Oct 2008 09:23:49
animation Cristina McIntire 07 Nov 2008 12:54:05
gui Hemal 06 Oct 2009 17:00:31
 

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