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.
I figured it out. Type the arrows (>>) in manually followed by any command or function and hit enter. It won't execute but the command window will start working again and the arrows will return.
To restore the Command Window to the default location, go to the Home tab, and in the Environment section, click Layout. Then, select from one of the default layout options. To bring focus to the Command Window from another tool such as the Editor, type commandwindow .
To run a MATLAB script from the the command line, use MATLAB's -r option, as in this example which runs the Matlab script my_simulation. m from the current directory. Note that the MATLAB script that you run should have an exit command in it.
Try
cd /Applications/MATLAB_R2015b.app/bin/
and then
./matlab
If that, hopefully, works, then you may have a path or environment issue with your O/S which is preventing your call to /Applications/MATLAB_R2015b.app/bin/matlab
from working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With