Description

MATLAB (MATrix LABoratory) is a popular, powerful, general-purpose system or environment for matrix algebra calculations and many other more specific computations and applications in Biology, Aerospace, Finance, data acquisition, etc. MATLAB may be used interactively or in batch. In addition, it supports a wide array of graphical applications, ranging from bar charts, line and surface plots to volumetric rendering.

Boston University offers a MATLAB Campus-Wide License. That means unlimited use of MATLAB, Simulink, and online learning tools for all students, faculty, staff, and researchers, on and off campus, on any device. Find out more and download what you need from our MATLAB portal: Boston University MATLAB Portal

Take advantage of free access to interactive courses through Boston University’s Campus-Wide Online Training subscription and build your MATLAB/Simulink skills. Find out more: Campus-Wide Online Training

Use MATLAB Grader to create interactive, auto-graded course assignments with instant learner feedback. Find out more: MATLAB Grader

Availability and Setup

MATLAB version R2013a is the default version on the SCC. If you wish to use a more recent version of MATLAB, you can do so using modules as explained here.

Those who wish to install MATLAB on their own computers, rather than using it on the SCC, should consult the MATLAB licenses page.

To enable graphics, MATLAB should be invoked under the X Window System on X terminals or workstations. To do this, you must first set your DISPLAY environment variable to allow you to run this X Application and allow it to display graphics on your local machine/terminal. You may also want to set the environment variable TERM to be xterm

Users accessing the SCC to run MATLAB from a PC or Mac will likely want to set up X Forwarding.

Running MATLAB Interactively

Running MATLAB interactively in the default mode enables graphics. This requires X Forwarding to run it. To invoke MATLAB on the SCC, type:

scc1$ matlab

This should bring up MATLAB in its own separate window with the Command Window active and the >> MATLAB command prompt. This signifies that you have successfully started the MATLAB environment.

On clients without xterm or if graphics are not needed, you can start MATLAB with graphics disabled:

scc1$ matlab -nodisplay

                            < M A T L A B (R) >
                  Copyright 1984-2013 The MathWorks, Inc.
                    R2013a (8.1.0.604) 64-bit (glnxa64)
                             February 15, 2013


To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.

>>

To close either version of the MATLAB session, enter exit or quit:

>> exit

Running MATLAB in Batch

See MATLAB Batch Jobs on the SCC.

Help/Documentation

To get started with MATLAB, you can visit our in-house Introduction to MATLAB tutorial. Alternatively, you can go to The Mathworks, MATLAB’s developer, site to learn from their MATLAB video tutorials on a wide range of applications. More frequently, users get help from within the MATLAB environment using the command help followed by the name of the utility function. For example,

>> help cos

If you don’t know the name of the utility, you can search with a succinct description (enclosed in single quotes to preserve spaces if multiple words are used) of the application, like this:

>> lookfor cosine
acos                           - Inverse cosine, result in radians.
acosd                          - Inverse cosine, result in degrees.
acosh                          - Inverse hyperbolic cosine.
cos                            - Cosine of argument in radians.
cosd                           - Cosine of argument in degrees.
cosh                           - Hyperbolic cosine.
. . .

To read the MATLAB documentation

>> help doc

As part of our RCS Online Code Examples section, we also have quite a large number of MATLAB code examples covering a broad set of topics.