ANIMATOR - animate data

This GUI tool allows you to animate your data with controls for playback speed and looping.
6,5K download
Aggiornato 1 set 2016

Visualizza la licenza

Nota dell'editore: This was a File Exchange Pick of the Week

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 graphics properties can be customized via a context menu on the objects. Right-click on the plotted lines to bring up the context 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* This uses the new MATLAB Class System, so it requires R2008a or newer.
*NOTE 2* Requires R2010b or newer to export to an AVI.
*NOTE 3* Requires Image Processing Toolbox to export to Animated GIF, if using R2008b or older. If you're not going to export to Animated GIF, you don't need Image Processing Toolbox.

Cita come

Jiro Doke (2024). ANIMATOR - animate data (https://www.mathworks.com/matlabcentral/fileexchange/16037-animator-animate-data), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2012b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Animation in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.2.0.1

Updated license

1.2.0.0

Updated to include an App file for R2012b.

1.1.0.0

Changed the implementation to use MATLAB classes. Added the ability to bring in data from the base workspace. Added the ability to interactively change the graphics properties via context menu.

1.0.0.0

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