Matlab+under+Linux

A brief guide on how-to install Matlab R2007a under Ubuntu 10.04.

1. Get a copy of the license e-mail from The Mathworks.

2. Create a directory where you want to install Matlab R2007a, and goto this directory:

code mkdir /usr/local/matlab74 cd /usr/local/matlab74 code

3. From the e-mail of The Mathworks, copy the information of the Linux License file to a file license.dat, which you create in the new matlab74 directory.

4. Insert the Matlab R2007a DVD and start the installation:

code cd /media/MATHWORKS_DVD ./install & code

Follow the installation steps. Make sure that you set the installation directory to your directory (/usr/local/matlab74/). In one of the first steps, the Matlab license file should be found and printed to the screen.

5. After installation, goto the Matlab directory, and run the installation script.

code cd /usr/local/matlab74 ./install_matlab code

6. Matlab uses a flexlm licensing manager which needs to be running in order to start Matlab. This server can be started either when you startup your computer, or when you start Matlab. I have chosen to write a script which automatically starts the flexlm server and then start Matlab.

code
 * 1) !/bin/sh

export AWT_TOOLKIT=MToolkit
 * 1) Add export for menubar

/usr/local/matlab74/etc/lmstart
 * 1) Startup license manager

/usr/local/matlab74/bin/matlab code
 * 1) Startup Matlab

You will notice the extra export rule which is needed because otherwise the Matlab menubar is not visible. I stored this file in the matlab directory (/usr/local/matlab74). Now you can start Matlab by running this script. If you want to add Matlab to a desktop launcher you just have to call this script. The icon can be found in /usr/local/matlab/X11/icons/.