MATLAB
From FarmShare
(→Getting Started) |
m (→Getting Started) |
||
Line 23: | Line 23: | ||
Use <code>module load</code> to set up your environment, and then run <code>matlab</code> to start an interactive session. | Use <code>module load</code> to set up your environment, and then run <code>matlab</code> to start an interactive session. | ||
+ | <source lang="sh"> | ||
module load matlab | module load matlab | ||
matlab | matlab | ||
+ | </source> | ||
If you have not configured a [https://srcc.stanford.edu/farmshare2/connecting remote display] MATLAB will start in text-mode, but the MATLAB desktop is also supported. | If you have not configured a [https://srcc.stanford.edu/farmshare2/connecting remote display] MATLAB will start in text-mode, but the MATLAB desktop is also supported. | ||
- | <source lang=sh> | + | <source lang="sh"> |
ssh -X sunetid@rice.stanford.edu | ssh -X sunetid@rice.stanford.edu | ||
module load matlab | module load matlab |
Revision as of 13:07, 14 September 2017
MATLAB is a multi-paradigm numerical computing environment and programming language.
Contents |
Getting Started
Run module avail
to get a list of all software modules, or module spider
to get a list of available versions of MATLAB.
module spider matlab -------------------------------------------------------------------------------------------------------------------------------- matlab: -------------------------------------------------------------------------------------------------------------------------------- Description: A multi-paradigm numerical computing environment and programming language. Versions: matlab/r2016b matlab/r2017a --------------------------------------------------------------------------------------------------------------------------------
Use module load
to set up your environment, and then run matlab
to start an interactive session.
module load matlab matlab
If you have not configured a remote display MATLAB will start in text-mode, but the MATLAB desktop is also supported.
ssh -X sunetid@rice.stanford.edu module load matlab matlab &
Running MATLAB in Batch Mode
If you have prepared MATLAB code as a program (.m
) file you can run it non-interactively.
matlab -nodesktop < program.m
You can use this method to submit a MATLAB job to a compute node, and you can even include MATLAB code in-line in an sbatch
script.
#!/bin/bash module load matlab matlab -nodesktop << EOF % MATLAB code EOF
Jupyter
MATLAB can also be run in a Jupyter notebook on FarmShare servers and used via a web browser.
The MATLAB Jupyter kernel is available as part of the prebuilt Jupyter environment accessible via the Jupyter installation guide.
Interactive Matlab
Info here: Matlab-interactive
Parallel Matlab
Info here: Matlab-parallel