animate

Real-time animation in Matlab, with keyboard call-backs
94 descargas
Actualizado 11 dic 2015

Ver licencia

This function is called to generate an animation from data. The user passes time and state data as vectors, as well as function handle to draw the system. Animate will attempt to plot the system at the desired rate. Keyboard call-backs are provided to allow the user to pause the animation, speed-up or slow-down, jump forward or backward by a frame, or restart.
%animate(t,x,P)
%
%FUNCTION:
% Animate is used to animate a system with state x at the times in t.
%
%INPUTS:
% t = [1xM] vector of times, Must be monotonic: t(k) < t(k+1)
% x = [NxM] matrix of states, corresponding to times in t
% P = animation parameter struct, with fields:
% .plotFunc = @(t,x) = function handle to create a plot
% t = a scalar time
% x = [Nx1] state vector
% .speed = scalar multiple of time, for playback speed
% .figNum = (optional) figure number for plotting. Default = 1000.
% .verbose = set to false to prevent printing details. Default = true;
%
%OUTPUTS:
% Animation based on data in t and x.
%
%NOTES:
%
% Keyboard commands during simulation:
%
% 'space' - toggle pause
%
% 'r' - reset animation
%
% 'uparrow' - go faster
%
% 'downarrow' - go slower
%
% 'rightarrow' - jump forward by 5 frames
%
% 'leftarrow' - jump backward by 5 frames
%
% 'esc' - quit animation
%
%

Citar como

Matthew Kelly (2024). animate (https://www.mathworks.com/matlabcentral/fileexchange/54427-animate), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2012a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Animation en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.1.0.0

improved description

1.0.0.0