%% Capture Contents of Figure
%% Can't embed yet
% Create a surface plot. Capture the interior of the figure window, excluding the menu and tool bars.

surf(peaks)
F = getframe(gcf);

% F is a structure with the field cdata that contains the captured image data.
% Use imshow to display the captured image data.
%
%% Embed this section

figure
imshow(F.cdata)

% Copyright 2015 The MathWorks, Inc.