Adding Matlab to my Path (Mac)

조회 수: 59 (최근 30일)
larn
larn 2020년 5월 6일
답변: Uday 2023년 3월 15일
Hello everyone! I have been trying to add matlab to my path, but to no avail. This is what my current path looks like:
but when I type in "matlab" or "./matlab", I keep getting the error message "no such file or directory". Is there something else I need to include? Thanks!
EDIT: Once adding matlab to my path, can I run mcc to create makefiles as long as I have the compiler installed?
  댓글 수: 3
jessupj
jessupj 2020년 5월 6일
you might try just '/Applications/MATLAB_R2020a.app/bin' on the path, without the executable name and the flag/options, and then try 'which matlab' to see if it's found.
larn
larn 2020년 5월 6일
Okay, that worked, thank you all!

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

답변 (1개)

Uday
Uday 2023년 3월 15일
The best way to achieve this is to symlink your binary in /usr/local/bin dir as this is already included in your path. (This comes from the pattern that homebrew uses & is widely accepted practise.)
$ sudo ln -s /Applications/MATLAB_R2023a.app/bin/matlab /usr/local/bin
There by you can invoke MATLAB on terminal with $ matlab
If you want to see your symlinks on usr/local/bin, just do $ ls -la /usr/local/bin

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by