MATLAB: Problems calling matlab from command line in OS X

path mac command line matlab

Hi. I installed Matlab 2011a before removing 2009a. After the installation '$which matlab' pointed to /usr/bin/matlab, which called 2009a.
Now I've removed 2009a (just deleted it from Applications) and '$which matlab' is blank.
'$ls /usr/bin/matlab' shows a file, but Finder doesn't see it when I navigate to /usr/bin/.
How do I get '$matlab' to call 2011a?

Best Answer

I am a Linux user and sometimes there are odd differences between Linux and Mac, but you should be able to just recreate the symbolic link. From the command line as a privileged user you would want to do something like:
ln -s /usr/local/matlab/r2011a/bin/matlab /usr/bin/matlab
with /usr/local/matlab/r2011a/bin/matlab tailored to be your install directory.
Related Question