MATLAB-related procedures#
In this section, we will show you a few things related specifically to running code reproducibly with MATLAB. For more general debugging tips for MATLAB and other computer languages, see our wiki.
Running MATLAB without the desktop GUI and with log file#
See these instructions for finding the Matlab binary on the system. However, this should work “out of the box” on CCSS-managed systems from the Bash prompt.
start matlab -nosplash -minimize -r "addpath(genpath('.'));main" -logfile matlab.log
where main.m
is the Matlab program you want to run (you omit the .m
when calling it).
Note
This will still open a Matlab window in the background (check your taskbar).
Assuming MATLAB is in your path (check with matlab
), the following will generate a logfile.
matlab -nodisplay -r "addpath(genpath('.')); main" -logfile matlab.log
where main.m
is the Matlab program you want to run (you omit the .m
when calling it).
If you do not have matlab
in your path, check with system admins. For BioHPC, as long as you are on the ECCO nodes, you should have access. See BioHPC ECCO page for some details.