MATLAB Function Reference
  Go to function:
    Search    Help Desk 
movie    Examples   See Also

Play recorded movie frames

Syntax

Description

movie plays the movie defined by a matrix whose columns are movie frames (usually produced by getframe).

movie(M) plays the movie in matrix M once.

movie(M,n) plays the movie n times. If n is negative, each cycle is shown forward then backward. If n is a vector, the first element is the number of times the movie is played, and the second through last elements specify the order in which to play the frames. For example, if M has three columns, n = [10 3 2 1] plays the movie backwards 10 times.

movie(M,n,fps) plays the movie at fps frames per second. The default is 12 frames per second. Computers that cannot achieve the specified speed play as fast as possible.

movie(h,...) plays the movie in the Figure or Axes identified by h.

movie(h,M,n,fps,loc) specifies a four-element location vector, [x y 0 0], where the lower-left corner of the movie frame is anchored (only the first two elements in the vector are used). The location is relative to the lower-left corner of the Figure or Axes specified by handle and in units of pixels, regardless of the object's Units property.

Remarks

The movie function displays each frame as it loads the data into memory, and then plays the movie. This eliminates long delays with a blank screen when you load a memory-intensive movie. The movie's load cycle is not considered one of the movie repetitions.

Examples

Animate the peaks function as you scale the values of Z:

See Also

getframe, moviein



[ Previous | Help Desk | Next ]