I like to use the vim editor in an xterm for editing .m files. If you don't launch Matlab via an xterm in X11, then Matlab doesn't know to open an xterm.
One workaround is to create a launchvim.sh script as a text file:
Simply save this in /Applications and give everyone permission to run by running chmod 755 /Applications/launchvim.sh. Then, in Preferences in Matlab, go to Editor, and enter /Applications/launchvim.sh as your text editor.