https://www.googletagmanager.com/ns.html?id=GTM-M5WN4MT
Skip to main navigation   Skip to main content   Skip to footer

QuickStart MATLAB

MATLAB is short for MATrix LABoratory high-level language and interactive environment.

  • $ module avail MATLAB
  • $ module load MATLAB

    Note: default version is MATLAB/R2020a

    Please note, the module load command is case-sensitive.
    If you don't include a version, the default is loaded.

  • $ interact
    Note: the default options will reserve 1 node with 1 cpu for 1 hour.
    You can use interact --help to learn how to configure the script.

    Within an interact session, you can load matlab and test your matlab code.

    $ load MATLAB
    $ matlab -options   < input-file  > output-file

    Note: you can check the available toolkits in a running matlab session with var.

    Note: once your testing is complete, exit your interact session before submitting your qsub reservation.

  • #!/bin/bash
    #PBS -l nodes=1:ppn=1
    #PBS -l walltime=10:00:00
    #PBS -m abe
    #PBS -M [email protected]

    JOBID=`echo $PBS_JOBID | cut -f1 -d.`

    module load MATLAB

    # Create a temp workdir under scratch
    mkdir -p ${HOME}/scratch/matlab
    export PBS_MATLAB_WORKDIR=$( mktemp -d -p ${HOME}/scratch/matlab workdir_XXXXXXXXXX )

    matlab -nodisplay -nosplash -logfile ${FILE}.log -r "run ${FILE}"

    # Delete temp workdir
    rm -rf ${PBS_MATLAB_WORKDIR}
    Note: reservation is for 1 node with 1 cpu from the batch queue for 10 hours.

    Usage:  qsub run_matlab.pbs -vFILE=${PWD}/matlab_script.m
    Note: If you use the interact script, exit out before submitting with qsub.

Contact Information

Kennesaw Campus
1000 Chastain Road
Kennesaw, GA 30144

Marietta Campus
1100 South Marietta Pkwy
Marietta, GA 30060

Phone
470-KSU-INFO
(470-578-4636)

©
Assistive Options

Top of page


Assistive Options

Open the original version of this page.

UsableNet Assistive is a UsableNet product. UsableNet Assistive Main Page.