Matlab
Last Modified: 10/13 9:25
Description
Matlab integrates mathematical computing, visualization, and a powerful language to provide a flexible environment for technical computing. The open architecture makes it easy to use MATLAB and its companion products to explore data, create algorithms, and create custom tools that provide early insights and competitive advantages.
Version
- R2009A
Authorized Users
- circe account holders
- Students doing valid research
- Faculty
Platforms
- circe cluster
- Workstation/PC
Installation
Contents
Installing On Linux
Installing On Windows/Mac
Installing On Linux
Follow the steps below to download and install Matlab for Linux.
- Connect to https://rc.usf.edu/isos and login with your NetID and password. Change to the directory /Matlab/current/ and download the ISO file(s) to a temporary directory on your computer. Be sure to read any README file. Once you have downloaded all the files, disconnect from the ftp server.
Note: If you already have a previous version of Matlab installed you may skip to step 3.
- Next you will want to create the directory where you would like Matlab to be installed. We recommend installing to the directory /usr/local/matlab. To create the directory enter the following commands as root:
# mkdir /usr/local/matlab
You will also need to copy the license.dat file you have been provided to this directory before the installer is run. If you do not yet have a license.dat file you will need to click here: https://rc.usf.edu/licensing/licenserequest.php
- Change to the directory that contain the downloaded ISO images and create directory called dvd1 by typing the following command:
# mkdir dvd1
- Next you will need to mount the ISO image into the newly created directory, by typing the following (????? will be replaced by the version number from the file that you are using):
# mount -o loop matlab_?????_unix_mac.iso dvd1
- Now we are ready to install Matlab. Become root and change to the directory where we want to install Matlab, i.e /usr/local/matlab. Begin the installation process by entering the following command:
# $MOUNT_POINT_FOR_DVD1/install
Note that $MOUNT_POINT_FOR_DVD1 should be the full path to the directory dvd1 that we created in step 3.
- When the installer asks for the MATLAB Root directory location, enter the directory that you created (/usr/local/matlab) or where the previous version of Matlab is located. When you click OK, the installer should show you the license file that it found in the Matlab Root directory. Click OK to proceed with the installation.
- Next the installer should list the items to install, either select the default selections or you may add/remove items. We recommend that you install the default selections.
- Next the installer will ask whether or not to create symbolic links to Matlab and mex scripts. This is generally a good idea, click the option to activate it. We recommend specifying a directory that is in your $PATH. If the default directory (/usr/local/bin) is not in your $PATH variable, make sure to either add it after the installation or enter a path that is in your $PATH environment variable.
- Answer OK to the next questions and the installer will begin installing Matlab. After the installation is finished you should be able to run Matlab from the command line by entering the following command:
# matlab
Installing On Windows/Mac
Follow the steps below to download and install Matlab for Windows.
- Connect to https://rc.usf.edu/isos and login with your NetID and password. Change to the directory /Matlab/current/ and download the ISO file(s) to a temporary directory on your computer. Once you have downloaded the files, disconnect from the ftp server.
Note: If you don't have a previous version of Matlab installed you may skip to step 3.
- Unless you are going to keep your old version of Matlab you will want to remove the previous installation. You can do this by clicking on the Start button and expanding the Programs Menu and finding Matlab X.X (where X.X is your currently installed version). From this menu select Uninstall. Follow the onscreen directions to uninstall, remove all components of Matlab.
- Now you will need to create an installation DVD from the downloaded ISO file from step 1. You can create the DVD using your favorite DVD recording software. If you need help with recording DVDs please see our guide by clicking here.
Alternatively, you could mount the ISO without burning a CD. Read our guide to find out more.
- Once you have recorded the installation DVD, insert it to begin the installation. If the installer does not begin automatically click on My Computer and select your CDROM drive where the installation DVD is, and select setup.exe from the files contained on the CDROM.
- Select the Install manually without using the Internet option, then accept the license agreement. When the installer asks for the PLP or FIK code, insert the number contained in plp.txt sent by our License Request Form that corresponds to the version of Matlab that you are installing. When the installer asks for the license file, click "Browse" and select the "license.dat" file that you received in your E-Mail. Use the default values for each part of the installer, selecting Typical Installation and the recommended installation path. If you have not registered for a license file, please visit https://rc.usf.edu/licensing/licenserequest.php . If you have registered but have not received your license, please contact mailto:support@rc.usf.edu
- Once the installation is finished you will find an icon on your desktop to launch the new version of Matlab.
Running Matlab on Circe
Modules
Matlab requires the following module file and some prerequisites to run:
- apps/matlab/r2009a
To run Matlab on the cluster, ensure that you use module initadd to make the changes persistent. See Modules for more information.
There are two ways to run Matlab on Circe depending on the runtime of your particular job.
Jobs Longer than 20 Minutes in Length
To run Matlab jobs on Circe, users will need to submit their jobs to the scheduling environment if their jobs take more than 20 minutes to run on a standard PC.
If, for example, you have a Matlab script file named test.m with all your functions defined in it, you would set up a submit script like this:
#!/bin/bash #$ -cwd #$ -l h_rt=00:20:00 #$ -j y #$ -N matlab_test #$ -o output.$JOB_ID matlab -nodisplay -r test
You should be able to create the script file as shown above and submit it to the queue. Make sure to edit the job name (matlab_test) and the first function name (test) to whatever is best suited for your job. Also, ensure that the Matlab module, apps/matlab/r2009a is loaded and is persistent as described here.
If you would rather call a different function, make sure the file which contains it is named after the function. For example, if you want to call function addtwo, make sure it is defined in a file named addtwo.m.
Matlab will automatically detect any other .m files in the same directory and be able to execute functions within those files.
Jobs Shorter than 20 Minutes in Length (most common)
Simply type matlab at the command line. If you have properly configured an X11 session, you should see the full Matlab interface. If you haven't configured X11, you will be able to use the console interface. For users wishing to use the graphical interface over X11, please see our XWin32 Installation documentation.