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.
Bill York (2020). Get screen size (dynamic) (https://www.mathworks.com/matlabcentral/fileexchange/10957-get-screen-size-dynamic), MATLAB Central File Exchange. Retrieved .
Thx, but this does not behave as get(0,'MonitorPositions') in the event of multiple monitors.
It returns only one monitor size, whereas get(0,'MonitorPositions') returns a matrix with all positions & sizes.
If you need to use it on 64bit, compile a new mex file with the command:
I can't seem to find how to use this. The function body is empty.
One can also use
very good tool . need to use it on 64 bit windows , any help ?!
Thank you very much. What a PIA without this.
Good job. Thanks for this !
Thanks for putting that little but smart tool here!
I just would call the function GETSCREENSIZEINPIXELS to avoid any errors due to the current root units setting.
Any idea how to implement such thing under Linux?
Useful tool Russel. I will be using it.
Inspired: Get Monitor Dimensions