Macos – Running MATLAB from Mac OSX terminal

macosMATLABterminal

I'd love to run matlab from the terminal on my Macbook (running Lion), forgoing the standalone matlab interface. All the information I've found online suggests that the command is simply something along the lines of

$ matlab

followed by various tags (-nojvm, -nodesktop, -nosplash, etc.). When I run this from the terminal, I get

Js-MacBook-Pro:~ joehuchette$ matlab -nodesktop
-bash: matlab: command not found

I'm pretty inexperienced with this sort of thing, so any help would be much appreciated. Thanks!

Best Answer

Alternatively, put a symbolic link to the Matlab binary in your path:

sudo ln -s /Applications/MATLAB_RXXXx.app/bin/matlab /usr/local/bin

where XXXXx is the Matlab version.

Related Question