how MATLAB determines order of monitors
9 ビュー (過去 30 日間)
古いコメントを表示
Does anyone know how MATLAB determines the order of the monitors, when multiple monitors are connected?
I did this:
>> get(0, 'MonitorPositions')
ans =
-1919 -2182 1920 1080
1 1 1536 864
Why isn't the monitor whose position starts with (1,1) the first? My Windows settings clear state that this monitor is the principal one. Even if I go to Windows settings and rearranje the monitors (left-right), nothing changes (only the coordinates change). And if I set the secondary monitor as the principal one, nothing changes either.
Restarting MATLAB does not solve the issue (only the coordinates change).
Restarting Windows does not solve the issue (only the coordinates change).
I need a consistent way to identify each monitor being used by MATLAB.
0 件のコメント
回答 (1 件)
Taylor
2024 年 1 月 23 日
Can you share the values you get when restarting MATLAB and Windows? It's hard to tell exactly why the (1, 1) monitor isn't the first index, but it may be as simple as they sort the indexes based on the x-position. I have two monitors and this is my return:
get(0, "MonitorPositions")
ans =
1 1 1920 1080
1921 1 1920 1080
My primary monitor is on the left so this ordering makes sense to me. I'm wondering if your primary monitor is on the right which is why you're seeing negative position values.
参考
カテゴリ
Help Center および File Exchange で Function Creation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!