Parent page: Programming Applications

Introduction

MATLABĀ® is a high-level language and interactive environment that enables you to perform computationally intensive tasks faster than with traditional programming languages such as C, C++, and Fortran.

You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. Add-on toolboxes (collections of special-purpose MATLAB functions, available separately) extend the MATLAB environment to solve particular classes of problems in these application areas.

MATLAB provides a number of features for documenting and sharing your work. You can integrate your MATLAB code with other languages and applications, and distribute your MATLAB algorithms and applications.

MATLAB R2009b Installation Instructions

These are very preliminary instructions. The will be improved in the next few days. You will need superuser privileges. Right now the assumption is that MATLAB install files are in /media/cdrom.

1. Create the directory MATLAB will be installed to. It is recommended that you use /usr/local/matlabR2009b:

sudo mkdir /usr/local/matlabR2009b

2. Change your working directory to the directory MATLAB will be installed to:

cd /usr/local/matlabR2009b/

3. Run the MATLAB installer:

sudo sh /media/cdrom/install 

If you are running the student version on a 64-bit machine, you need to set the -glnx86 flag:

sudo sh /media/cdrom0/install_unix.sh -glnx86
  • Warning /!\ DO NOT START MATLAB AT THE END OF THE INSTALLATION

Starting MATLAB at the end of Product Activation creates a permissions problem for storing MATLAB preferences, since the directory and files inside of ~/.matlab will be created for the root user. However this inconvenience can be easily fixed running the following command:

sudo chown -R ${USER}:${USER} ~/.matlab

4. Run MATLAB's post installation script (not recommended, skip this step):

sudo /usr/local/matlabR2009b/install_matlab

Create A MATLAB Launcher

1. Get an icon:

sudo wget http://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png -O /usr/share/icons/matlab.png

2. Get the launcher file:

sudo wget 'https://help.ubuntu.com/community/MATLAB?action=AttachFile&do=get&target=matlab.desktop' -O /usr/share/applications/matlab.desktop

Setup gcc-4.2 for compiling MEX code

1. Install The GNU Compiler Collection 4.2 and The GNU Standard C++ Library

sudo aptitude install gcc-4.2-multilib libstdc++6-4.2-dev

2. Make a MATLAB specific 'bin' directory for gcc symlink.

mkdir ~/.matlab/bin

3. Symlink gcc to gcc-4.2 via user MATLAB specific 'bin' directory.

ln -s /usr/bin/gcc-4.2 ~/.matlab/bin/gcc

4. Add MATLAB specific 'bin' directory to the front of your system $PATH within your local startup.m file.

printf "setenv(\'PATH\',sprintf(\'/home/%%s/.matlab/bin:%%s\',getenv(\'USER\'),getenv(\'PATH\'));\n" >> ~/Documents/MATLAB/startup.m

Possible Problems

1. Preferences Permission

When you launch your MATLAB Desktop you might see an error message similar to the following:

The desktop configuration was not saved successfully
Cannot write to preference file "matlab.prf" in "/home/username/.matlab/R2009b".
Check file permissions.

You can resolve this by exiting all instances of MATLAB and issuing the following command in your terminal:

sudo chown -R ${USER}:${USER} ~/.matlab

2. Missing JRE

If you are using the student version on a 64-bit system, generate and paste the license.dat file in the /matlab/licenses folder. You may need to contact MATLAB support to generate the dat file.

External Links

For more information about MATLAB see the following links


CategoryScience

MATLAB/R2009b (last edited 2010-03-13 23:02:36 by c-98-193-168-102)