moviein

Purpose

Allocate matrix for movie frames.

Synopsis

M = moviein(n)
M = moviein(n,h)
M = moviein(n,h,rect)

Description

M = moviein(n) creates a matrix M large enough to hold n frames of a movie based on the current axis. The matrix has enough rows to store n copies of the output from getframe, one in each column.

M = moviein(n,h) specifies a graphics object other than the current axis. h is a handle to a figure or an axes.

M = moviein(n,h,rect) specifies the rectangle to copy the bitmap from, relative to the lower-left corner of object h and in the units of its Units property,

rect = [left  bottom  width  height]
where width and height define the dimensions of the rectangle.

In each case, moviein allocates an appropriate matrix for the getframe function. Use getframe with the same parameters to actually create the movie; for example,

M = moviein(n)
for i = 1:n
    plot_command
    M(:,i) = getframe
end

See Also

getframe, movie

(c) Copyright 1994 by The MathWorks, Inc.