animate

バージョン 1.1.0.0 (4.22 KB) 作成者: Matthew Kelly
Real-time animation in Matlab, with keyboard call-backs
ダウンロード: 95
更新 2015/12/11

ライセンスの表示

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
%
%

引用

Matthew Kelly (2024). animate (https://www.mathworks.com/matlabcentral/fileexchange/54427-animate), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R2012a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersAnimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.1.0.0

improved description

1.0.0.0