MATLAB
Overview
MATLAB [MATrix LABoratory] is an integrated technical computing environment from The Mathworks that combines numeric computation, 2- and 3-d graphics & visualisation, and a high-level programming language.
Version 2017a, Version 2016a, Version 2015aSP1, Version 2014a and 2013a are installed on the iCSF.
Restrictions on use
All use is subject to the MATLAB campus licence agreement.
Set up procedure
To set up the MATLAB environment you need to load one of the appropriate modulefiles:
module load apps/binapps/matlab/R2021a # If you specifically require R2020a please contact us module load apps/binapps/matlab/R2019a module load apps/binapps/matlab/R2017a module load apps/binapps/matlab/R2016a module load apps/binapps/matlab/R2015a module load apps/binapps/matlab/R2014a
Running the application
Ensure the modulefile is loaded then simply run
matlab
It is not necessary to compile your MATLAB code on the iCSF before running (interactively). However, if you plan to run your code in batch on the CSF then you should ensure it compiles – the CSF requires compiled MATLAB code.
Toolboxes available
The following toolboxes are available in R2017a, R2016a, R2015a.
- MATLAB
- Simulink
- Bioinformatics Toolbox
- Control System Toolbox
- Embedded Coder
- Financial Toolbox
- Fuzzy Logic Toolbox
- Global Optimisation Toolbox
- Image Processing Toolbox
- MATLAB Coder
- MATLAB Compiler
- Neural Networks
- Optimization Toolbox
- Parallel Computing Toolbox
- PDE Toolbox
- Robust Control Toolbox
- Signal Processing Toolbox
- Simulink 3D Animation
- Simulink Coder
- Simulink Control Design
- Statistics and Machine Learning Toolbox
- Symbolic Math
- System Identification Toolbox
- Wavelets
The following toolboxes are available in R2014a.
- MATLAB
- Simulink
- Bioinformatics Toolbox
- Control System Toolbox
- Embedded Coder
- Financial Toolbox
- Fuzzy Logic Toolbox
- Global Optimisation Toolbox
- Image Processing Toolbox
- MATLAB Coder
- MATLAB Compiler
- Neural Networks
- Optimization Toolbox
- Parallel Computing Toolbox
- PDE Toolbox
- Robust Control Toolbox
- Signal Processing Toolbox
- Simulink 3D Animation
- Simulink Coder
- Simulink Control Design
- Statistics Toolbox
- Symbolic Math
- System Identification Toolbox
- Wavelets
The following toolboxes are available in R2013a.
- MATLAB
- Simulink
- Bioinformatics Toolbox
- Fuzzy Logic Toolbox
- Image Processing Toolbox
- MATLAB Compiler
- Neural Network Toolbox
- Optimization Toolbox
- Parallel Computing Toolbox
- Signal Processing Toolbox
- Simulink 3D Animation
- Statistics Toolbox
- Symbolic Math Toolbox
Please note that some of these toolboxes have extremely limited numbers of licenses. For example, there are only two licenses for the Bioinformatics toolbox site-wide.
If you can’t access one of the above toolboxes, or if you need to use a toolbox that isn’t included here then please read the advice given at the following URL. It gives advice on how to use alternatives to toolboxes along with contact details of IS Staff who can facilitate the purchase of extra toolboxes.
Third-party Toolboxes
A number of third-party toolboxes are available:
- Fieldtrip
- Marsbar
- SPM
A modulefile can be loaded for each toolbox to add the toolbox to the MATLABPATH
environment variable.
To see a list of available modulefiles run:
module avail apps/binapps/matlab/thirdparty
and then
module load apps/binapps/matlab/thirdparty/name/version
Hints and Tips
Random Numbers
If you are running an application that uses random numbers, it is suggested that you read and understand the article Parallel Random Numbers in MATLAB
Further information
- Community Wiki page on MATLAB
- Some functions cannot be compiled (Everything from the symbolic toolbox for example). A full list of restrictions and exclusions can be found at http://www.mathworks.com/help/toolbox/compiler/br2cqa0-1.html
- It is often possible to speed-up MATLAB code significantly using techniques such as vectorisation, mex files, parallelisation and more. If you would like advice on how to optimise your MATLAB application then fill out the Research Application support request form.
MATLAB Error and the Fix for GUI switching to dark mode
A problem with the display switching to dark mode when editing Matlab scripts with M1 macOS using XQuartz and “ssh” to incline has been reported. Further information about the problem and the fix can be found in .
The solution to the problem for that is to generate a file “java.opts” in your home directory and restart Matlab. You will need to select “Add to Path” when the prompt appears when you run your .m script.
The “java.opts” file should include the following:
-Dsun.java2d.xrender=false -Dsun.java2d.pmoffscreen=false
Updates
None.