MATLAB® is a programming platform designed specifically for engineers and scientists. The heart of MATLAB is the MATLAB language, a matrix-based language allowing the most natural expression of computational mathematics.  UEA has a site licence, and you can run multiple instances on the cluster.

What can you do with MATLAB?

Using MATLAB, you can:

  • Analyze data
  • Develop algorithms
  • Create models and applications

The language, apps, and built-in math functions enable you to quickly explore multiple approaches to arrive at a solution. MATLAB lets you take your ideas from research to production by deploying to enterprise applications and embedded devices, as well as integrating with Simulink® and Model-Based Design.

There are lots of examples and tutorials on the matlab site.

Using Matlab on ADA

There are two ways of working with matlab on ADA - interactive and batch mode.

Interactive session

Best used for testing out scripts and for jobs that require visualisation.  If you need to do intensive visualisation, you should look at our visualistaion service.

  • start an interactive session
  • in the window (note the prompt will have changed to show the node name) type
            module add matlab
  • type matlab &
  • then run whatever you want in matlab (using matlab help as appropriate)

Batch jobs

  • write a submit script similar to this example job script  (eg matlab-test.sub):

# Mail events (NONE, BEGIN, END, FAIL, ALL)#SBATCH --mail-type=END,FAIL   
# Where to send mail#SBATCH --mail-user=<username>    
#SBATCH -p compute-16-64             # Select compute queue
#SBATCH -t 36:00:00             # Set time limit to 36 hours
#SBATCH --job-name=matlab-test_job      # Set job name
#SBATCH -o matlab-test-%j.out               # Write job output to MatJob-(job_number).out
#SBATCH -e matlab-test-%j.err               # Write job error to MatJob-(job_number).err
#set up environment
module add matlab/2018a
#run the application
matlab -nodisplay -nojvm -nodesktop -nosplash -r my_matlab_m_file


  • at the bottom of that script there is a line that runs your matlab commands.  You can put all your matlab commands that you would type in an interactive session in a script - in the example called my_matlab_m_file
    Matlab scripts - see
  • submit the script using sbatch matlab-submit-script-name   (eg matlab-test.sub)

Useful links

If you don't know how to edit files on Ada - have a look at

You might also find useful if you aren't used to using the command line.