www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/ConvertMovieFrameToImageDataExample.m

    %% Convert Movie Frame to Image Data
% Create a surface plot.

% Copyright 2015 The MathWorks, Inc.


surf(peaks)     

%% 
% Use |getframe| to capture the plot as a movie frame.
% Then, convert the captured movie frame to image data.

F = getframe;              
[X,map] = frame2im(F);