Size: 6262
Comment: Remove trailing whitespace from each line
|
Size: 6744
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 12: | Line 12: |
= MATLAB R2011a = == Important Note Regarding Ubuntu 11.04 == MATLAB R2011a was released on April 8, 2011. Please note that this is prior to the release of Ubuntu 11.04. Consequently Ubuntu 11.04 is not a supported operating system for MATLAB R2011a. |
= MATLAB R2012a = == Important Note Regarding Ubuntu 12.04 == MATLAB R2012a was released on March 1, 2012. Please note that this is prior to the release of Ubuntu 12.04. Consequently Ubuntu 12.04 is not a supported operating system for MATLAB R2012a as it can be seen in the [[http://www.mathworks.nl/support/sysreq/roadmap.html|MATLAB Roadmap]]. |
Line 16: | Line 16: |
MATLAB R2011a users are strongly encouraged to install R2011a on [[https://wiki.ubuntu.com/LucidLynx|Ubuntu 10.04 LTS]] or [[https://wiki.ubuntu.com/MaverickMeerkat|Ubuntu 10.10]] for best results. Installation of MATLAB R2011a on unsupported Ubuntu releases are outside the scope of this documentation. | MATLAB R2012a users are strongly encouraged to install R2012a on [[https://wiki.ubuntu.com/LucidLynx|Ubuntu 10.04 LTS]] or [[https://wiki.ubuntu.com/MaverickMeerkat|Ubuntu 10.10]] for best results. Help for the installation of MATLAB R2012a on Ubuntu 12.04 will however be given through this tutorial. |
Line 19: | Line 19: |
You will need superuser privileges. The assumption is that MATLAB install files are located at '''/media/MATHWORKS_R2011a''' in your filesystem. | You will need superuser privileges. The assumption is that MATLAB install files are located at '''/media/MATHWORKS_R2012a''' in your filesystem. |
Line 23: | Line 23: |
sudo /media/MATHWORKS_R2011A/install | sudo /media/MATHWORKS_R2012A/install |
Line 25: | Line 25: |
If it complains about java, try installing [[apt:openjdk-6-jre|install ''OpenJDK Java 6'' package]]. For some unknown reasons, it seems to work only for version 6 and not for version 7 of OpenJDK. |
|
Line 30: | Line 32: |
3. When prompted to ''''Specify installation folder'''' it is recommended that you use the default folder '''/usr/local/MATLAB/R2011a'''. | 3. When prompted to ''''Specify installation folder'''' it is recommended that you use the default folder '''/usr/local/MATLAB/R2012a'''. |
Line 47: | Line 49: |
sudo wget 'https://help.ubuntu.com/community/MATLAB?action=AttachFile&do=get&target=matlab-r2011a.desktop' -O /usr/share/applications/matlab.desktop | sudo wget 'https://help.ubuntu.com/community/MATLAB?action=AttachFile&do=get&target=matlab-r2012a.desktop' -O /usr/share/applications/matlab.desktop |
Line 50: | Line 52: |
If you get two MATLAB launcher icons in your Unity laucher, try adding this line to /usr/share/applications/matlab.desktop: | If you get two MATLAB launcher icons in your Unity laucher, try uncommenting this line in /usr/share/applications/matlab.desktop: |
Line 56: | Line 58: |
=== Warning === The following has been written for R2011a with Ubuntu 10.04 and 10.10. It may vary a lot if you are using the R2012a with Ubuntu 12.04. ---- |
|
Line 108: | Line 114: |
* [[MATLAB/R2011a|R2011a]] | |
Line 114: | Line 121: |
* < http://www.mathworks.com/support/sysreq/current_release/linux.html > - System Requirements - Release 2011a * < http://www.mathworks.com/support/compilers/R2011a/glnxa64.html > - Supported and Compatible Compilers – Release 2011a - Linux |
* < http://www.mathworks.nl/support/sysreq/sv-r2012a/linux.html > - System Requirements - Release 2012a * < http://www.mathworks.com/support/compilers/R2012a/glnxa64.html > - Supported and Compatible Compilers – Release 2012a - Linux |
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 R2012a
Important Note Regarding Ubuntu 12.04
MATLAB R2012a was released on March 1, 2012. Please note that this is prior to the release of Ubuntu 12.04. Consequently Ubuntu 12.04 is not a supported operating system for MATLAB R2012a as it can be seen in the MATLAB Roadmap.
MATLAB R2012a users are strongly encouraged to install R2012a on Ubuntu 10.04 LTS or Ubuntu 10.10 for best results. Help for the installation of MATLAB R2012a on Ubuntu 12.04 will however be given through this tutorial.
Installation Instructions
You will need superuser privileges. The assumption is that MATLAB install files are located at /media/MATHWORKS_R2012a in your filesystem.
1. Run the MATLAB installer with the following Terminal command:
sudo /media/MATHWORKS_R2012A/install
If it complains about java, try installing install ''OpenJDK Java 6'' package. For some unknown reasons, it seems to work only for version 6 and not for version 7 of OpenJDK.
2. When prompted to 'Choose installation type' you should select custom. This will allow you to create symbolic links to MATLAB in /usr/local/bin.
3. When prompted to 'Specify installation folder' it is recommended that you use the default folder /usr/local/MATLAB/R2012a.
4. When given the option to 'Create symbolick links to MATLAB scripts in:' it is recommended that you check the box and use the supplied path /usr/local/bin.
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-r2012a.desktop' -O /usr/share/applications/matlab.desktop
If you get two MATLAB launcher icons in your Unity laucher, try uncommenting this line in /usr/share/applications/matlab.desktop:
StartupWMClass=com-mathworks-util-PostVMInit
MEX functions
Warning
The following has been written for R2011a with Ubuntu 10.04 and 10.10. It may vary a lot if you are using the R2012a with Ubuntu 12.04.
If you try to compile MEX functions you may see a message like the following:
Warning: You are using gcc version "4.4.4-14ubuntu5)". The version currently supported with MEX is "4.3.4". For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release/
Note this is a warning - the MEX function will still compile.
The following instructions will setup gcc 4.3 and make it the default compiler for MATLAB:
1. Install The GNU Compiler Collection 4.3 and The GNU Standard C++ Library
sudo apt-get install gcc-4.3-multilib libstdc++6-4.3-dev
2. Make a MATLAB specific 'bin' directory for gcc symlink.
mkdir ~/.matlab/bin
3. Symlink gcc to gcc-4.3 via user MATLAB specific 'bin' directory.
ln -s /usr/bin/gcc-4.3 ~/.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
Steps 3 and 4 above may not work for at least one instance of a user trying to compile using MEX in MATLAB R2011a running on Ubuntu 10.10. An alternative is to do the following:
- 3a. At the MATLAB Command Window prompt, type:
mex -setup
and choose option 2 which says:
2: /usr/local/MATLAB/R2011a/bin/mexopts.sh : Template Options file for building MEX-files via the system ANSI compiler
This will copy to your home directory a local copy of the file mexopts.sh.
- 4a. Then edit this local file:
sudo gedit ~/.matlab/R2011a/mexopts.sh
and replace all instances of CC='gcc' to CC='gcc-4.3', CXX='g++' to CXX='g++-4.3', and FC='gfortran' to FC='gfortran-4.3'. Save and exit. The next time you run MEX in MATLAB to compile it will work properly.
For more ideas, try this thread or this one.
Previous Versions
External Links
Compatibility information:
< http://www.mathworks.nl/support/sysreq/sv-r2012a/linux.html > - System Requirements - Release 2012a
< http://www.mathworks.com/support/compilers/R2012a/glnxa64.html > - Supported and Compatible Compilers – Release 2012a - Linux
For more information about MATLAB see the following links
< http://www.mathworks.com/ > - MathWorks - MATLAB and Simulink for Technical Computing.
< http://www.mathworks.com/products/matlab/ > - MATLAB - The Language Of Technical Computing
< http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html > - MATLAB Documentation.
< http://www.mathworks.com/support/ > - The MathWorks Support.
< http://www.mathworks.com/matlabcentral/ > - MATLAB Central.
< http://www.mathworks.com/matlabcentral/fileexchange/ > - MATLAB Central File Exchange.