I have need for both 32- and 64-bit R2015b on my Windows machine. I use 64-bit MATLAB most of the time and would like lots of Java heap space (2GB is usually a good amount since I have 32GB physical RAM). It will let me set the slider to 2048MB in Preferences just fine. However, I do occasionally need to use the 32-bit version. When I open it, it immediately complains that it can't start the JVM because there's not enough memory and that next time it'll go back to the default 256MB. But then that restricts the 64-bit version. The matlab.prf file doesn't appear to have any way of distinguishing 32- vs. 64-bit architecture to set it there. And a java.opts file isn't MATLAB syntax so I can't set it conditionally based on computer('arch') either. Any suggestions on a workaround so each build of a particular release can have a different max heap size?