You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
GETSCREENSIZE Same as get( 0, 'ScreenSize' ), but dynamic
SZ = GETSCREENSIZE returns a 1x4 vector of doubles giving the size of the display in pixels, in the same way as get( 0, 'ScreenSize' ), except it reads the current settings rather than reading a static copy made at MATLAB® startup time.
From "doc rootobject_props":
"Note that the ScreenSize property is static. Its values are read only at MATLAB startup and not updated if system display settings change."
Some applications place windows based on on the display resolution, and the resolution can change - mine does when I disconnect my laptop from my external monitor.
Cite As
Bill York (2026). Get screen size (dynamic) (https://www.mathworks.com/matlabcentral/fileexchange/10957-get-screen-size-dynamic), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired: Get Monitor Dimensions
General Information
- Version 1.0.0.1 (3.57 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
