필터 지우기
필터 지우기

problems calling matlab from command line in OS X

조회 수: 4 (최근 30일)
Robert
Robert 2011년 8월 22일
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
Robert
Robert 2011년 8월 22일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Daniel Shub
Daniel Shub 2011년 8월 22일
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.

추가 답변 (1개)

Kelly Kearney
Kelly Kearney 2011년 8월 22일
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.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by