Diff for "MATLAB"


Differences between revisions 39 and 40
Revision 39 as of 2009-05-03 23:10:31
Size: 6765
Editor: DHCP-129-59-230-192
Comment: removing old content
Revision 40 as of 2009-05-03 23:12:56
Size: 2532
Editor: DHCP-129-59-230-192
Comment: removing old content
Deletions are marked like this. Additions are marked like this.
Line 63: Line 63:
= MATLAB R2006a, R2007a & R2008a Installation Instructions =

1. Run the MATLAB installer
Insert CD 1 of 3 and then
{{{
sudo sh /media/cdrom/install
}}}

2. Run MATLAB's post installation script
{{{
sudo /usr/local/matlab72/install_matlab
}}}
(discussed in this thread http://ubuntuforums.org/showthread.php?t=19855)

3. Start MATLAB (if you created simlinks):
{{{
/usr/local/bin/matlab
}}}

You can pass additional options to start MATLAB, in the format '''matlab -option directory'''. Here are a few of the most popular ones.
{{{
-nodesktop Start MATLAB in a console, without the GUI - much faster loading.
-nosplash Don't show that annoying MATLAB splash screen as it loads.
-nojvm Do not start Java support. This also causes -nodesktop.
-r "command" Start MATLAB and execute the given command.
-h Show more MATLAB options.

directory Opens a directory as workspace in MATLAB
}}}

An example command would be '''matlab -nojvm -nosplash -r "1+1"'''

= Installing from an ISO Image =

Alternatively to burning the 3 CDs to cd-rom, you can just mount the iso image and install directly from it.
Prepare iso mounting:
{{{
sudo mkdir /media/iso
sudo modprobe loop
}}}
Then mount the first disk:
{{{
sudo mount MathWorks_2006b1m.iso /media/iso/ -t iso9660 -o loop
}}}
And to unmount it:
{{{
sudo umount /media/iso/
}}}

= Modes of Operation =
At a minimum, you don't need much to run MATLAB. It will run in the console without X just fine, though naturally missing some functionality such as graphing. Most users, however, use many of the bells and whistles. The Prerequisites section is made with that in mind.

To use the MATLAB desktop, GUIDE, Simulink, and all the nice graphs, you need to have [[Java]] installed, and the executable in your path. If you don't, you'll have to run from a terminal, which isn't always the greatest. A quick way to check to see if you have Java in your path is to open a terminal and type '''which java'''. If it comes back with something similar to '''/usr/local/bin''', you're good to go, otherwise you need to follow the instructions in the [[Java]] How-To.

You will get far better performance making complex graphs if hardware accelerated openGL rendering is set up properly. Open up a terminal and run the following command.
{{{
glxinfo | grep direct
}}}
If the output is `direct rendering: Yes`, then you should be fine. Otherwise you might be able to get it working using non-free graphics drivers. See BinaryDriverHowto. If this doesn't solve your problem, you might have trouble getting direct rendering working on your card. If you are still interested, you might want to search for information on your specific card model and see if anyone else has gotten direct rendering working.


= Missing cellfun.mexglx (and other files) =

If you are installing Matlab (Version 7.0.1.24704 (R14) Service Pack 1) on a x86 machine with Ubuntu (Breezy Badger) there could be some problems with the permissions on file '''/etc/libc.so.6''', which, by default, does not have executable permission and does not behave like it is expected by some scripts. When some scripts (install and startup scripts) try to query the version of the libc file, they are returned empty strings. Possibly because of this issue, some of the mexglx files are not installed and when matlab starts up, the script '''${matlab_dir}/bin/util/oscheck.sh''' also reports the following error.
{{{
/opt/matlab/bin/util/oscheck.sh: line 134: /lib/libc.so.6: Permission denied
}}}
The file '''${matlab_dir}/toolbox/matlab/datatypes/cellfun.mexglx''' was not installed and this could cause problems when trying to execute a simple command such as '''ls''', for e.g.,
{{{
>> ls
??? Attempt to execute SCRIPT cellfun as a function.
Error in ==> iscellstr at 13
  res = cellfun('isclass',s,'char');
Error in ==> ls at 16
if iscellstr(varargin)
}}}

One way to solve this would be to modify two lines in the scripts '''${matlab_dir}/bin/util/oscheck.sh''' as well as in the script '''${matlab_install_cd}/install'''. Line 697 of '''${matlab_install_cd}/install'''

Tag/tag.png

Content Cleanup Required
This article should be cleaned-up to follow the content standards in the Wiki Guide. More info...

Parent page: Programming Applications

Consider using Octave instead, which is Free Software.

MATLAB R2009a 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 ~/R2009a.

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

sudo mkdir /usr/local/matlabR2009a

2. Change you working directory to the directory MATLAB will be installed to

cd /usr/local/matlabR2009a/

3. Run the MATLAB installer

sudo sh ~/R2009a/install 

DO NOT START MATLAB AT THE END OF PRODUCT ACTIVATION

4. Run MATLAB's post installation script

sudo /usr/local/matlabR2009a/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

Possible Problem

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/R2009a".
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

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)