-bash: matlab: command not found

Viewed 11906

I am a bit surprised, but I can't run matlab by the terminal of my Mac. I am trying the command

/Applications/MATLAB_R2015b.app/bin/matlab

but I get the error

-bash: matlab: command not found

Listing the contenents of the folder /Applications/MATLAB_R2015b.app/bin/ I can see the word matlab which is supposed to be the executable. I don't know what's happening.

3 Answers

add the installation directory to the PATH environment, for example:

export PATH=/Applications/MATLAB_R2017b.app/bin/:$PATH

then launch Matlab with

matlab

in your terminal

It works fine, however, if you used the default folder it would be something like export PATH=/usr/local/MATLAB/R2021b/bin/:$PATH Additionally, remember about activating matlab before via running the activate_matlab.sh script located in the installation folder

Related