MATLAB: How to start multiple MATLAB sessions on a Mac OS X without having multiple Terminal windows open up, in MATLAB 7.9 (R2009b)

MATLAB

I know of a workaround to start multiple sessions of MATLAB on a Mac OS X (see related solution). This results in the cluttering of my desktop when a separate Terminal window opens up for each instance of MATLAB. How can I suppress the Terminal windows opening up on my desktop?

Best Answer

The following steps will enable this functionality:
1. Launch /Applications/Utilities/AppleScript Editor.app
2. Paste this text into the empty script window (all on one line):
do shell script "/Applications/MATLAB_R2009a.app/bin/matlab -desktop > /dev/null 2>&1 &"
3. Select "File > Save As...", choose "File Format: Application", and choose a name for the app such as "Launch MATLAB"
4. Quit AppleScript Editor
5. Double-click on "Launch MATLAB" in the Finder, or drag it to the Dock and click on it there.