Princeton University has purchased licenses for MATLAB as well as a substantial number of MATLAB Toolboxes. This software can be used on CS public use servers (cycles), including the ionic and neuronic clusters, as well as individual users' machines. Installation instructions and detailed licensing information can be found on OIT's Princeton Software MATLAB page.
MATLAB Distributed Computing Server (MDCS) is available on the ionic and neuronic clusters.
Command Line MATLAB
List available versions and the corresponding module files:
module avail matlab
To load the appropriate module
module load matlab/R2024b
The module load command configures your environment, including PATH.
Run MATLAB
Interactive job (without a GUI)
module load matlab matlab -nodisplay
Slurm Batch Mode (without a GUI)
In order to run MATLAB in jobs, the MATLAB environment module must be loaded, similarly to an interactive mode. For example, to run the my_script.m script, the job script should at minimum contain:
#!/bin/bash #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --mem=100M #SBATCH --time=00:02:00 #SBATCH --output=%x-%j.out module load matlab matlab -batch my_script.m