How Do I Run A Matlab Script From The Command Line?
How Do I Run A Matlab Script From The Command Line? 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.