This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Behaviour of the animation toolbar

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Value Summary

InheritedBackAndForth, Loop, or RunOnce

Graphics Primitives

ObjectsAnimationStyle Default Values


AnimationStyle determines how an animation is played in VCam once it is activated.

AnimationStyle determines what has to be done when an animation reaches the end of its playing time. With RunOnce the animation stops, with BackAndForth the animation reverts and runs through to the beginning and with Loop it jumps back to the beginning and runs on from there on.

AnimationStyle sets the initial value of the Animation Style menu in the animation toolbar according to its value.


Example 1

This example shows an animation which builds up a picture frame by frame and at the end of the animation time the complete picture is visible. For this kind of animation the value RunOnce is a good choice for AnimationStyle:

plot(plot::Line2d([a/36, 0], [sin(a/18*PI), cos(a/18*PI)], 
                  VisibleAfter = a/7.2, 
                  Color = [sin(a/18*PI), sin(a/18*PI), cos(a/18*PI)])
                  $ a = -36..36, 
     AnimationStyle = RunOnce)

Example 2

This example plays in an endless loop and the value Loop is choosen because first frame is the natural successor of the last frame of the animation:

plot(plot::Function2d(sin(a*x), x = -PI..PI, a = -PI..PI),
     AnimationStyle = Loop)

Example 3

In this example the circle grows from radius 0 to radius 1. With AnimationStyle = BackAndForth the circle grows and shrinks in an endless loop:

plot(plot::Circle2d(a, a = 0..1),
     AnimationStyle = BackAndForth)

See Also

MuPAD Functions

Was this topic helpful?