MATLAB screen size not matching local screen size for Mac
22 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Raj
2023 年 9 月 22 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!