Diff for "MATLAB"


Differences between revisions 74 and 75
Revision 74 as of 2010-10-22 19:06:21
Size: 6585
Editor: GRAPHICARTS-SIX-O-FOUR
Comment:
Revision 75 as of 2010-11-02 15:50:50
Size: 4375
Editor: 129
Comment: Updating for R2010b ... seems as if The MathWorks has fixed some installation issues from previous versions ... problems that have not yet been confirmed will be removed until they can be confirmed
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
= MATLAB R2010a Installation Instructions =
 You will need superuser privileges. The assumption is that MATLAB install files are in '''/media/MATHWORKS_R2010A'''.
= MATLAB R2010b Installation Instructions =
 You will need superuser privileges. The assumption is that MATLAB install files are in '''/media/MATHWORKS_R2010B'''.
Line 15: Line 15:
1. Create the directory MATLAB will be installed to. It is recommended that you use '''/usr/local/matlabR2010a''': 1. Run the MATLAB installer:
Line 17: Line 17:
sudo mkdir /usr/local/matlabR2010a sudo sh /media/MATHWORKS_R2010B/install
Line 20: Line 20:
2. Change your working directory to the directory MATLAB will be installed to:
{{{
cd /usr/local/matlabR2010a/
}}}
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.
Line 25: Line 22:
3. Run the MATLAB installer:
{{{
sudo sh /media/MATHWORKS_R2010A/install
}}}
3. When prompted to ''''Specify installation folder'''' it is recommended that you use the default folder '/usr/local/MATLAB/R2010b'.

4. When given the option to ''''Create symbolick links to MATLAB scripts in:'''' it is recommended that you check the box and use the path '/usr/local/bin'.
Line 32: Line 28:
sudo sh /media/MATHWORKS_R2010A/install_unix.sh -glnx86 sudo sh /media/MATHWORKS_R2010B/install_unix.sh -glnx86
Line 34: Line 30:

 /!\ '''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
}}}

Note: For MATLAB 2010b, you can choose NOT to activate at the end of the install and after you run MATLAB again, you will be asked for licensing credentials. You can now activate MATLAB and the preference files will not be created for root, but you instead.
Line 54: Line 40:
sudo wget 'https://help.ubuntu.com/community/MATLAB?action=AttachFile&do=get&target=matlab-r2010a.desktop' -O /usr/share/applications/matlab.desktop sudo wget 'https://help.ubuntu.com/community/MATLAB?action=AttachFile&do=get&target=matlab-r2010b.desktop' -O /usr/share/applications/matlab.desktop
Line 61: Line 47:
Warning: You are using gcc version "4.4.3-4ubuntu5)". The version
         currently supported with MEX is "4.2.3".
Warning: You are using gcc version "4.4.4-14ubuntu5)". The version
         currently supported with MEX is "4.3.4".
Line 69: Line 55:
The following instructions will setup gcc 4.2 and make it the default compiler for MATLAB on versions of Ubuntu prior to 10.04 LTS (Lucid): The following instructions will setup gcc 4.3 and make it the default compiler for MATLAB:
Line 71: Line 57:
1. Install The GNU Compiler Collection 4.2 and The GNU Standard C++ Library 1. Install The GNU Compiler Collection 4.3 and The GNU Standard C++ Library
Line 73: Line 59:
sudo aptitude install gcc-4.2-multilib libstdc++6-4.2-dev sudo apt-get install gcc-4.3-multilib libstdc++6-4.3-dev
Line 79: Line 65:
3. Symlink gcc to gcc-4.2 via user MATLAB specific 'bin' directory. 3. Symlink gcc to gcc-4.3 via user MATLAB specific 'bin' directory.
Line 81: Line 67:
ln -s /usr/bin/gcc-4.2 ~/.matlab/bin/gcc ln -s /usr/bin/gcc-4.3 ~/.matlab/bin/gcc
Line 88: Line 74:
== Possible Problems ==

=== 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/R2010a".
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
}}}

=== 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.

=== Slow GUI/Matlab freezes on some plot commands ===

Incompatibilities between Matlab, X11 and Java are reported to cause issues with the Matlab GUI; for example, the GUI may freeze with a simple plot command such as plot(1:100000,1:100000). The following _might_ help:

 * Setting MATLAB_JAVA to the system java. In $MATLABROOT/bin/.matlab7rc.sh, add the line
{{{
MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre/
}}}
(or wherever the JRE might be installed on your system). Run matlab -e and verify that MATLAB_JAVA is indeed set. Then run matlab as usual.
  * Forcing Matlab to work with an older version of X11. Copy /opt/lib/libX11.so.6.*.* (*.* is the subversion number) from an old version of Ubuntu (Karmic will do) to a new folder (for example /X11old) on the Lucid install. Then add symlinks to this .so,
{{{
ln -s libX11.so.6.*.* libX11.so.6
ln -s libX11.so.6.*.* libX11.so
}}}

 Finally add
{{{
LD_LIBRARY_PATH='/X11old'
}}}
 at the end of .matlab7rc.sh.
Line 132: Line 77:
 * [[MATLAB/R2010a|R2010a]]

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 R2010b Installation Instructions

  • You will need superuser privileges. The assumption is that MATLAB install files are in /media/MATHWORKS_R2010B.

1. Run the MATLAB installer:

sudo sh /media/MATHWORKS_R2010B/install 

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/R2010b'.

4. When given the option to 'Create symbolick links to MATLAB scripts in:' it is recommended that you check the box and use the path '/usr/local/bin'.

The above "installer" gives you the choice between the 32-bit and 64-bit platform. However, if you are running the student version on a 64-bit machine, you need to set the -glnx86 flag:

sudo sh /media/MATHWORKS_R2010B/install_unix.sh -glnx86

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-r2010b.desktop' -O /usr/share/applications/matlab.desktop

MEX functions

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

For more ideas, try this thread or this one.

Previous Versions

External Links

For more information about MATLAB see the following links


CategoryScience

MATLAB (last edited 2015-10-30 17:51:30 by ip-37-201-246-20)