fanimator
Create stop-motion animation object
Description
fanimator( creates a stop-motion animation
object from the function f)f. The function f must
return graphics objects that depend on only one variable. This variable defines the time
parameter of the animation.
By default, fanimator creates stop-motion frames of
f(t0), generating 10 frames per unit interval of
t0 within the range of t0 from 0 to 10.
fanimator(
allows the function f,args)f to depend on multiple variables.
args specifies the input arguments of f.
By default, the variable t = sym('t') is the time parameter of the
animation. This syntax creates stop-motion frames of
f(subs(args,t,t0))
within the range of t0 from 0 to 10. You can animate a specific
property of the graphics objects by setting its value to depend on t in
the input argument args.
fanimator(___,
specifies the animation properties using one or more Name,Value)Name,Value pair
arguments. Use this option with any of the input argument combinations in the previous
syntaxes. Name-value pair settings apply to the animation object created.
fanimator( creates a
stop-motion animation object in the axis specified by ax,___)ax instead of
in the current axis (gca). The option ax can
precede any input argument combinations in the previous syntaxes.
returns an
fp = fanimator(___)Animator object. Use fp to query and modify the
properties of a specific animation object. For a list of properties, see Animator Properties.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
When you create a graph by using a plotting function, such as
fplot, MATLAB® creates a series of graphics objects. You can then animate a specific property of the graphics objects by using thefanimatorand theplayAnimationfunctions. Note that some functions, such astitleandxlabel, create text objects that cannot be animated. Instead, use thetextfunction to create text objects that can be animated.
Version History
Introduced in R2019a
See Also
animationToFrame | playAnimation | rewindAnimation | writeAnimation
















