MATLAB
Using MATLAB at UVa
What Is MATLAB?
The MATLAB high-performance language for technical computing integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation.MATLAB Availability
Faculty, staff, and students connected to the UVa network may use MATLAB. The University has 255 floating network licenses for MATLAB 2010b on the following platforms: Linux, Mac OSX (PowerPC and Intel-based), and Windows (XP/Vista/Windows 7). 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 ITS's UNIX platforms and in ITS's Public Labs under Start>Programs>Mathematics>MATLAB or virtually via the Hive.
MATLAB and Toolboxes Available via Download
Matlab users at UVa must now download Matlab product updates directly from the MathWorks website by becoming an "associated user" of UVa's site license. Once you have associated with the UVa site license, it may take overnight to be activated. After the initial activation downloads from Mathworks is immediate. This assures that you have access to the most up-to-date version of Matlab.
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 | 17 |
| 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 |
| 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 ITS does not currently maintain may be purchased through ITS ($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 ITS Research Computing in the Scholars' Lab.
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 staff in the Scholars' Lab or Research Computing Lab 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
To install MATLAB you will first need to get the license.dat file and File Installation Key (FIK). You will obtain these from the licensing database.
After getting the license.dat file and the FIK, follow the instructions on the MathWorks website for installing MATLAB 7.6 on a UNIX/Linux client: "Installing and Activating Without an Internet Connection."
As an alternative to installing MATLAB locally on the machine, system administrators can mount the Matlab installation directory from the ITS UNIX server to Linux 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
ITS 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
To install MATLAB you will first need to get the license.dat file and File Installation Key (FIK). You will obtain these from the licensing database.
After getting the license.dat file and the FIK, follow the instructions on the MathWorks website for installing MATLAB 7.6 on a Windows client: "Installing and Activating Without an Internet Connection."
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
To install MATLAB you will first need to get the license.dat file and File Installation Key (FIK). You will obtain these from the licensing database.
After getting the license.dat file and the FIK, follow the instructions on the MathWorks website for installing MATLAB a Mac client: "Installing and Activating Without an Internet Connection."
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.
Need help?
ITS supports Matlab users through the Research Computing Support group located in the Scholars’ Lab in Alderman Library.
- Visit us in the Scholars’ Lab in Alderman Library. Our hours are 8:30 AM until 5:00 PM, Monday through Friday.
- Call us at (434) 243-8800.
- Email us.