MATLAB
Installation Method
| Installation Method | Recommended |
|---|---|
| Module | ✅ Yes |
| Container | ✅ Yes |
| Conda | ❌ No |
| Source | ❌ No |
Running the MATLAB graphical interface
To launch the MATLAB graphical interface, you can use the MATLAB application from Open OnDemand.
Running the MATLAB command line without graphics
To use the MATLAB command-line interface without graphics, you can request a
compute node, load the MATLAB module, and then use the -nodisplay and
-nosplash options:
matlab -nodisplay -nosplash
This will work on both Windows and Mac platforms. To quit matlab command-line interface, type:
exit
MATLAB in batch jobs
To use MATLAB in your batch jobs, you can use the -r switch provided by
MATLAB, which lets you run commands specified on the command-line. For example:
matlab -nodisplay -nosplash -r myscript
will run the MATLAB script myscript.m, Or:
matlab -nodisplay -nosplash < myscript.m > myscript_results.txt
will run the MATLAB script myscript.m and write the output to
myscript_results.txt file. Thus, an example batch job using MATLAB could have
a batch script as follows:
Please wait, retrieving
job.slurm from Globus...The test MATLAB script is:
Please wait, retrieving
test.m from Globus...