Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question

migrated from stackoverflow.com Jan 24 '12 at 14:29

This question came from our site for professional and enthusiast programmers.

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.

share|improve this answer

Where is matlab located on your machine? The error you're getting indicates that it's not in the normal search path, so you'll need to either add the path:

export PATH=$PATH:/path/to/matlab

or use a full path to invoke matlab:

$ /path/to/matlab
share|improve this answer

You must log in to answer this question.