Installing MATLAB on Ubuntu

MATLAB (matrix laboratory) is a software developed by MathWorks that allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, and Fortran.

Although a lot of software are designed for OS like Windows, this software has also a version designed for Linux.

The installation is quite easy and one can just follow the instructions described inside the “install_guide.pdf” that can be found in the DVD of Matlab (or you can download it from the source at the end of this post) and if you are lucky you can start working with this software without encountering any errors during the overall process.

I decided to summarise the overall process trying to point out the most important part that could led to error.

1) obviously the first thing to do is insert the DVD inside the DVD drive of your pc. Otherwise if you have a back up copy of the DVD like as a disk image in the format .iso, then you just need to mount it.

2) open your terminal and change the location to the directory of your DVD. For my case it is: cd /media/cdrom1/

3) now we need to launch the installer. To do so you just need to type: ./install or sudo ./install

the secondo version with sudo is to give the permission to the installer to create directory in special directory that requires root privilege.

4) now you just need to follow the instructions that appear to complete the installation.

To start MATLAB software you just need to type in the terminal the path where is located the script-shell type file called “matlab“.

For my case it’s:

/usr/local/MATLAB/R2012a/bin/matlab

In the case you have Ubuntu 11.04 or newer you will notice a message of warning(although the software will open up just fine):

/usr/local/MATLAB/R2011a/bin/util/oscheck.sh: 605: /lib/libc.so.6: not found

Some answer to why there is this warning can be found here (it’s written in Italian). To solve this problem you just need to type this in the terminal:

for 32 bit version of Ubuntu

sudo ln -s /lib/i386-linux-gnu/libc-2.13.so /lib/libc.so.6

for 64 bit version of Ubuntu

sudo ln -s /lib64/x86_64-linux-gnu/libc-2.13.so /lib64/libc.so.6

In my case I noticed that insted of libc-2.13.so I have in my system libc-2.15.so. So I just changed the command up in this:

sudo ln -s /lib/i386-linux-gnu/libc-2.15.so /lib/libc.so.6

—————————————————————————————————————————————————–

UPDATE: I also noticed that, instead of doing the above command, you can just copy the file libc.so.6 that is inside the folder /lib/i386-linux-gnu/ into the required folder that is  /lib  . This method is the same as the above command that is creating a file called libc.so.6 that is linked to the file libc-2.15.so.

—————————————————————————————————————————————————–

Then I just relaunched MATLAB and now the warning has disappeared.

To have a fast access to the program we can create a Launcher inside of our Dash or better put in the sidesibar of Unity.

First we need to get an icon for our Launcher. Just type this inside of your terminal:

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

or simply save this image and put it in the directory /usr/share/icons/

then you just need to follow this tutorial.

PS: in the following links you can read about some extra problems and their solutions not indicated in this tutorial because for now it’s not of my interest.

Sources:

One Response to Installing MATLAB on Ubuntu

  1. Vance Jubyna says:

    As quickly as I finish posting this comments, I am going to dispurse connect to this post to all of my buddies and household. I know some of them will value the chance for more information about this. A big thank you to the author of this post! It’s excellent to check out some more practical information concerning this topic.

Leave a comment