12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

getframe<strong>MATLAB</strong> and that can take advantage of true color support, use the followingapproach:F = getframe(gcf);[X,Map] = frame2im(f);imshow(X,Map)RemarksUsually, getframe is used in a for loop to assemble an array of movie framesfor playback using movie. For example,for j = 1:nplotting commandsF(j) = getframe;endmovie(F)To create movies that are compatible with earlier versions of <strong>MATLAB</strong> (beforeRelease 11/<strong>MATLAB</strong> 5.3) use this approach:M = moviein(n);for j = 1:nplotting commandsM(:,j) = getframe;endmovie(M)Capture RegionsNote that F = getframe; returns the contents of the current axes, exclusive ofthe axis labels, title, or tick labels. F = getframe(gcf); captures the entireinterior of the current figure window. To capture the figure window menu, usethe form F = getframe(h,rect) with a rectangle sized to include the menu.2-211

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!