MATLAB screen size not matching local screen size for Mac
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm opening an image in MATLAB with imshow and it does not look correct at full size (2464x2056 pixels), but it does look correct when zoomed in (1000x1000 pixels). I checked the resolution on my computer using:
set(0,'units','pixels')
Pix_SS = get(0,'screensize')
1 1 1512 982
However, this is not the resolution of my screen. I restarted MATLAB since using an external screen to ensure that this is the resolution detected by MATLAB. I am running a macbook pro M2pro 14 inch screen with resolution 3024 × 1964 pixels (checked in System Settings). I believe the issues with the image display is due to the difference between my actual display size and what matlab percieves my display size to be as one half of the actual display size.
I am running MATLAB R2023a Update 2, 64-bit (maci64).
0 comentarios
Respuestas (1)
Raj
el 22 de Sept. de 2023
Hi Ben,
As per my understanding you are noticing inconsistency of MATLAB screen size and that of the local screen size of your Mac.
get(0,'screensize')
This set of command gives you screen size of the main default screen you working on. So apparently if you are using 2 screens, then this line will give screen size of your main screen.
Now as far is both sizes not same is considered, with display scaling enabled, the effective resolution is 1512x982 pixels. This means that if you were to create a rectangle of that size in MATLAB, it would occupy the entire screen. To account for the higher DPI, Windows scales up that rectangle to 3024 × 1964 pixels. However, when display scaling is disabled, Windows does not perform any virtualization, thus requiring the full 3024 × 1964 pixels to fill the screen. The drawback of disabling display scaling is that text might appear smaller and more challenging to read.
I hope this answers your query!!
0 comentarios
Ver también
Categorías
Más información sobre Environment and Settings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!