Borrar filtros
Borrar filtros

problems calling matlab from command line in OS X

4 visualizaciones (últimos 30 días)
Robert
Robert el 22 de Ag. de 2011
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?
  1 comentario
Robert
Robert el 22 de Ag. de 2011
Thanks Kelly and Daniel. ls -l showed that /usr/bin/matlab pointed to the deleted 2009a version.
Daniel's advice worked. Here are the exact commands I used, in case someone else has this problem:
$ sudo rm /usr/bin/matlab
$ sudo ln -s /Applications/MATLAB_R2011a.app/bin/matlab /usr/bin/matlab
Of course, you'll likely have to modify the path(s) above.

Iniciar sesión para comentar.

Respuesta aceptada

Daniel Shub
Daniel Shub el 22 de Ag. de 2011
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.

Más respuestas (1)

Kelly Kearney
Kelly Kearney el 22 de Ag. de 2011
The /usr/bin/matlab file should be a symbolic link; do an ls -l to see where it's pointing (should point to <matlabroot >/bin/matlab). In my experience this link always updates to the most recently installed version of Matlab (I never uninstall my previous versions), though it would seem something went wrong on your most recent install.
Can't recall whether Finder shows symbolic links by default or not... they show up in mine, but I may have altered preferences for this.
You might want to try reinstalling the new version of Matlab, and see if the link resurrects itself. Not sure if manually creating it (via ln) would do more harm than good.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by