%GETFRAME Get movie frame.
%   GETFRAME returns a movie frame. The frame is a snapshot
%   of the current axis. GETFRAME is usually used in a FOR loop 
%   to assemble an array of movie frames for playback using MOVIE.  
%   For example:
%
%      for j=1:n
%         plot_command
%         M(j) = getframe;
%      end
%      movie(M)
%
%   To create movies in a way that is compatible with earlier 
%   versions of MATLAB (before Release 11/MATLAB 5.3) use the 
%   following:
%
%      M = moviein(n);
%      for j=1:n
%         plot_command
%         M(:,j) = getframe;
%      end
%      movie(M)
%
%   GETFRAME(H) gets a frame from object H, where H is a handle
%   to a figure or an axis.
%   GETFRAME(H,RECT) specifies the rectangle to copy the bitmap
%   from, in pixels, relative to the lower-left corner of object H.
%
%   F = GETFRAME(...) returns a movie frame which is a structure 
%   having the fields "cdata" and "colormap" which contain the
%   the image data in a uint8 matrix and the colormap in a double
%   matrix. F.cdata will be Height-by-Width-by-3 and F.colormap  
%   will be empty on systems that use TrueColor graphics.  
%   For example:
%
%      f = getframe(gcf);
%      colormap(f.colormap);
%      image(f.cdata);
%
%   [X,MAP] = GETFRAME(...) returns the frame as an indexed image 
%   matrix X and a colormap MAP. This way of using GETFRAME is 
%   provided only for compatibility with earlier versions of
%   MATLAB.  Because indexed images can not always capture a 
%   TrueColor display, it is better to use the form of GETFRAME
%   that can return a TrueColor image.  To write code that is 
%   compatible with earlier versions of MATLAB and that can take
%   advantage of TrueColor support in Release 11 (MATLAB 5.3) use
%   something like the following:
%      
%      f = getframe(gcf);
%      [X, map] = frame2im(f);
%      colormap(map); image(X);
%
%   See also MOVIE, MOVIEIN, IMAGE, IM2FRAME, FRAME2IM.

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 5.11 $  $Date: 2000/06/02 04:30:45 $
%   Built-in function.
