MATLAB on the cluster

These two scripts are examples of how to run MATLAB on the Research Cluster.  Use a text editor, such as nano, to create the script files. 

Make the scripts executable using the chmod command:

chmod a+x file

Only run MATLAB from within a job, rather than on the login node.


Run MATLAB in Interactive mode using the following script:

matlab-interactive.sh
#!/bin/bash
export MLM_LICENSE_FILE=/datasets/software/R2020b/licenses/network.lic
/datasets/software/R2020b/bin/matlab -nojvm -nodisplay -nosplash


Run MATLAB in Batch mode using the following script where the argument to the script is the name of your MATLAB batch file (e.g. "matlab-batch.sh MyScript.m").

matlab-batch.sh
#!/bin/bash
export MLM_LICENSE_FILE=/datasets/software/R2020b/licenses/network.lic
/datasets/software/R2020b/bin/matlab -nodisplay -nosplash -batch "run('$1');"