View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

4.7 | 3 ratings Rate this file 18 Downloads (last 30 days) File Size: 2.69 KB File ID: #22031 Version: 1.3



matt dash (view profile)


08 Nov 2008 (Updated )

Replacement for getframe for multiple-monitor systems. Also takes screenshots of non-MATLAB windows.

| Watch this File

File Information

GETSCREEN works just like the MATLAB function getframe, but works on any monitor, not just the primary one. (Getframe gives an error if you use it on a figure displayed on your second monitor) Can also be used to take screenshots from any area of your display, whether or not it is a MATLAB figure.

Syntax is the same as getframe, and can be used to capture entire figures or axes, or a rectangular subarea of these. Can also be called using just a position vector to take a screenshot of that area of your display, regardless of whether it is a MATLAB figure or not.

Uses java.awt.robot to take screenshots, so it requires java.


Screencapture inspired this file.

This file inspired Dropshadow Drop Shadow Class For Plot Objects.

MATLAB release MATLAB 7.6 (R2008a)
Other requirements java. Only tested in Windows (xp and vista).
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
29 Nov 2016 hyun-woo

great! thank you so much.

02 Aug 2012 UEIH UEIH

12 May 2011 Enrique

Enrique (view profile)

3 mal = 3 times.

Comment only
12 May 2011 Enrique

Enrique (view profile)

Its a lot faster (3 mal in my computer) if you change the lines 113 - 118 (the Java to Matlab RGB conversion) to:

rasta = typecast(rasta, 'uint8');

I posted my own version of saurabh kumar screencapture script here

Comment only
19 Dec 2008 Arturo Serrano

Arturo Serrano (view profile)

Thanks for the code. I found it just when a I needed it.
Just a point. I had to add
>> pause (0.01);
after drawnow.

17 Nov 2008 1.3

updated inspired by

Contact us