Please note that MATLAB is officially supported only for single monitor setups.
You can try to work around this issue by changing the Java Virtual Machine that MATLAB uses. See the related solution below for instructions on how to do this.
To check that MATLAB is using the new JVM, launch MATLAB using the -nodisplay option and enter 'version -java' at the MATLAB command prompt.
If MATLAB is not using the new JVM, you may need to create a symbolic link from MATLAB's Java path (for example, /usr/local/matlab/sys/java/jre/glnxa64/jre1.6.0_13) to the new JVM. Then add a file called /usr/local/matlab/sys/java/jre/glnxa64/jre.cfg to contain the single line:
1.6.0_13
Best Answer