Determine MATLAB's Monitor in a multiple monitor configuration
<p>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.</p>

<p>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 <code>p = get(gcf, 'Position')</code>, <code>set(0, 'DefaultFigurePosition', p)</code>, and <code>movegui</code> command, but this will only work if I know beforehand which monitor I want to use.</p>

<p>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?</p>