MATLAB Support

MATLAB is an integrated technical computing environment that combines numeric computation, advanced graphics and visualization, and a high-level programming language. MATLAB includes hundreds of functions for data analysis and visualization, numeric and symbolic computation, engineering and scientific graphics, modeling/simulation and prototyping, and programming/application development and GUI design.

Table of Contents

MATLAB Availability

Faculty, staff, and students connected to the UVa network may use MATLAB. The University has 255 floating network licenses for MATLAB 7.6 (2008a) on the following platforms: Sun Solaris, Linux, Mac OSX (PowerPC and Intel-based), and Windows (2000/NT/XP/Vista). MATLAB 6.5 is the most recent version available for the IBM AIX and SGI IRIX platforms. In order to use these licenses, the computer must be connected to the University network to enable it to communicate with the network license manager. MATLAB is available on ITC's Unix platforms and in ITC's Public Labs under Start/Programs/Mathematics/MATLAB.

MATLAB 7.5 is currently available on ITC's Solaris and Linux platforms using the path /uva/bin/matlab. MATLAB 7.4 is available as /uva/bin/matlab.old on those platforms.

MATLAB CDs are available for three day check-out from the Scholars Lab, Alderman Library (243-8800) or the Research Computing Lab, Brown Science & Engineering Library, Clark Hall (243-8799). Faculty may request delivery via a LEO request. The CDs may be returned to any University Library. LSPs can keep the CDs for an extended period of time by emailing Res-Consult@Virginia.edu before getting the software.

MATLAB and Toolboxes Also Available via Download

As an alternative to borrowing the MATLAB CDs, MATLAB users at UVa can download and install MATLAB and licensed Toolboxes directly from the MathWorks website.

If you are using MATLAB from off-Grounds, you will have to go through an authentication process to connect to the MATLAB license manager with the UVaAnywhere VPN client.

In addition to the standard MATLAB environment functionality, the University has floating network licenses for the toolboxes in the table below. The following link provides MATLAB Toolbox Overviews for all MathWork's products.

MATLAB Toolbox Number of Licenses
Bioinformatics 5
MATLAB Compiler 5
Communications 10
Communications Blockset 5
Control System 40
Curve Fitting 10
Distributed Computing Toolbox 50
Distributed Computing Engine 128
Financial 5
Genetic Algorithm/Direct Search 10
Image Processing 35
Neural Network 5
Optimization 35
Robust Control 15
Signal Processing 35
Signal Processing Blockset 5
Simulink 30
Simulink Control Design 25
Simulink Response Optimization 5
Splines 7
Statistics 35
Symbolic Math 30
System Identification 5
Wavelet 5

NOTE: It is very important that MATLAB users not leave their session idle for hours at a time since that needlessly consumes a MATLAB license as well as the licenses for any toolboxes they might have used during that session. For the same reason, a single user should not open up multiple sessions of MATLAB.

Floating network licenses for MATLAB toolboxes that ITC does not currently maintain may be purchased through ITC ($200 for a 1-user license, $300 for a 2-user license, etc.) and made available with the rest of our MATLAB products. Users interested in obtaining additional toolboxes should contact ITC Research Computing Support for further information.

Licenses for individual copies of MATLAB (cpu locked and therefore not requiring connection to the license manager) can be purchased from The MathWorks for $500 ($200 for toolboxes) by contacting Scott Benway at 508-647-7741 (or by email at sbenway@mathworks.com). MATLAB users who are interested in having other toolboxes added to the University site license should contact ITC Research Computing Support for further information. A Student Version is also available that is a fully functional version of MATLAB, typically one version behind the professional version of MATLAB. It can only be used for class work (not research), and only while the purchaser is a student. It can either be purchased through the MathWorks or from Cavalier Computers, but upgrades to more recent versions are not included.

Getting Started with MATLAB

Access From Unix Platforms

Instructions for installing MATLAB 7.6 on a Unix/Linux client can be found on the MathWorks website. The license.dat file and File Installation Key (FIK) necessary for installation can be obtained from the licensing database. Please follow the instructions "Installing and Activating Without an Internet Connection", since the license.dat and FIK are all you will need.

As an alternative to installing MATLAB locally on the machine, system administrators can mount the matlab installation directory from the ITC Unix server to Linux or Solaris systems. View the procedure for mounting the MATLAB installation directory.

If you are using MATLAB on a linux machine from off Grounds, you will have to go through an authentication process to connect to the MATLAB license manager either with ssh_tunneling or via the UVaAnywhere VPN client.

To start MATLAB graphic interface, type the command

 $ matlab

at the Unix prompt. The path /uva/bin should be part of your PATH variable by default). This will always start up the most recent version of MATLAB installed.

To start MATLAB command line interface, at the Unix prompt type the command,

 $ matlab -nodesktop

ITC will typically keep an older version of MATLAB installed which can be invoked with the command matlab.old rather than matlab in the examples above.

Running MATLAB remotely

If you are running MATLAB on a Unix machine other than the one you originally logged into, you should use the secure shell client slogin (or ssh) to connect to the remote machine so that the MATLAB display is automatically redirected to your login machine.

Running MATLAB in batch mode

MATLAB can be run in a non-interactive (batch) mode with an input file, e.g. matlab_script.m, containing the commands which would have been executed in the command window of MATLAB. To submit the job and then be able to logout, use the Unix at command

at -f matlab_batch now

where the file named matlab_batch contains the line

matlab -nodesktop -r "matlab_script;exit" -logfile output_file

Output from the session will be written to a file named output_file.

The -r flag is preferable over the Unix redirect command (< matlab_script.m) because it takes advantage of MATLAB's Just-In-Time (JIT) Accelerator which significantly improves the performance of loops. Please note the addition of the MATLAB exit command. This command may be put at the end of the matlab_script.m file instead, in which case the quotation marks are unnecessary. The exit command causes MATLAB to exit once it completes the script. Failing to use the exit command prevents MATLAB from exiting, thereby needlessly using limited(!) licenses and system resources. Note too that only the M-file's base name (matlab_script) is used and not the extension ( .m ).

If your job takes more than one hour of cpu time to run, it is strongly suggested that you apply for an account on a research computing platform.

Access From Windows

Instructions for installing MATLAB 7.6 on a Windows client can be found on the MathWorks website. The license.dat file and File Installation Key (FIK) necessary for installation can be obtained from the licensing database. Please follow the instructions "Installing and Activating Without an Internet Connection", since the license.dat and FIK are all you will need.

If you are using MATLAB on a Windows machine from off Grounds, you will have to go through an authentication process to connect to the MATLAB license manager via the UVaAnywhere VPN client.

NOTE: Windows users should insure that any personally installed firewall software does not block the MATLAB client from contacting the network license manager.

Access From Macs

Instructions for installing MATLAB 7.6 on a Mac client can be found on the MathWorks website. The license.dat file and File Installation Key (FIK) necessary for installation can be obtained from the licensing database. Please follow the instructions "Installing and Activating Without an Internet Connection", since the license.dat and FIK are all you will need.

If you are using MATLAB on a Mac from off Grounds, you will have to go through an authentication process to connect to the MATLAB license manager via the UVaAnywhere VPN client.

Getting Help with MATLAB

There are several different ways to access online information about MATLAB functions. The help command is the most basic way to determine the syntax and behavior of a particular function, e.g. from the MATLAB command window >>help magic. Information is displayed directly in the command window. The command help by itself lists all the directories, with a description of the function category each represents.

The lookfor command allows you to search for functions based on a keyword, e.g. >>lookfor inverse. It searches through the first line of help text, which is known as the H1 line, for each MATLAB function, and returns the H1 lines containing a specified keyword. Adding -all to the lookfor command searches the entire help entry, not just the H1 line.

For platforms that currently support the MATLAB Desktop interface (Windows, Sun, SGI, and most Linux), detailed information and examples about MATLAB commands and functionality can be accessed through the Help Browser. All MATLAB documentation can be accessed online (in HTML and PDF format) through the Help Browser. The Desktop interface and Help Browser are discussed in the MathWork's "Getting Starting with MATLAB" tutorial, linked below.

Additional copies of the manuals can be ordered through The MathWorks Store.

Tutorial Documents

If users cannot find the answers to their questions in the online documentation, they can email their questions to ITC Research Computing Support.

MATLAB users can also browse the The MathWorks Support website or contact the The MathWorks Technical Support using the University Matlab site license number by logging into the licensing database and accessing the Matlab licensing codes page.

MATLAB Examples

MATLAB has a set of demonstration programs exhibiting various aspects of its functionality that can run from the MATLAB Command Window with the commands demo.

  • Application Examples
    Examples of how MATLAB, Simulink, and the Toolboxes has been used in various applications.

Other MATLAB Resources

Maximizing MATLAB Performance
Techniques that often improve the execution speed and memory management of MATLAB code:
Techniques for Debugging MATLAB M-files
Tools for correcting errors in MATLAB code.
MATLAB Central
File exchange and newsgroup access for the MATLAB & Simulink user community.
MATLAB Newsletters
The MathWork's electronic newsletter.
MATLAB Upcoming Events & Webinars
Event information page which includes upcoming and archived web seminars.

© 2008 by the Rector and Visitors of the University of Virginia.

The information contained on the University of Virginia’s Department of Information Technology and Communication (ITC) website is provided as a public service with the understanding that ITC makes no representations or warranties, either expressed or implied, concerning the accuracy, completeness, reliability or suitability of the information, including warrantees of title, non-infringement of copyright or patent rights of others. These pages are expected to represent the University of Virginia community and the State of Virginia in a professional manner in accordance with the University of Virginia’s Computing Policies.