Use the export node to generate an animation or to export data to an external file (ASCII format). This section includes information about
Animation Export,
Data Export, and the
Animation Player.
Animations can be defined as two different types: a movie or an image sequence. The movie generates file formats such as GIF (.gif), AVI (
.avi), or flash (
.swf); the image sequence generates a sequence of images. Make sure COMSOL with MATLAB using a graphics COMSOL Multiphysics Server to enable plot on server.
where anim is a link to an animation node and
type is either
'imageseq' or
'movie'.
In the above, typefilename depends on the type of animation export:
'imagefilename' for an image sequence,
'giffilename' for a gif animation,
'flashfilename' for a flash animation, and
'avifilename' for an avi animation.
For a movie type animation, it is possible to change the number of frames per second with the command:
where <fps_number> is a positive integer that corresponds to the number of frames per second to use.
where, the positive integers <width_px> and
<height_px> are the width and height size (in pixels), respectively, to use for the animation.
where <pgtag> refers to the plot group, which is animated in the player.
where <maxnum> is a positive integer value that corresponds to the maximum number of frames to generate with the player.
Use the run method to generate the player: