I move around from a company site to another a lot. At any given day, I might have just my laptop or as many as four monitors. With multiple monitors, I don't know which monitor I will choose to use for MATLAB main GUI (the main GUI launched when double-clicking matlab.exe). It depends on the resolutions of the available monitors.
I use scripts that utilize programmatically generated GUIs (not by GUIDE) and it seems that MATLAB pops them up always on the first monitor. I've researched a little bit and found to locate the GUIs to a monitor of choice by using p = get(gcf, 'Position')
, set(0, 'DefaultFigurePosition', p)
, and movegui
command, but this will only work if I know beforehand which monitor I want to use.
Is there a way to find out on which monitor the main MATLAB GUI is up and have other little GUIs pop up on the same monitor?