how MATLAB determines order of monitors
조회 수: 5 (최근 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!