# Difference between revisions of "Matlab"

Bchurchill (talk | contribs) (added some details on making the 64-bit install work) |
Bchurchill (talk | contribs) m (→x86_64) |
||

Line 26: | Line 26: | ||

$ pacman -S lib32-libxi | $ pacman -S lib32-libxi | ||

− | $ | + | $ yaourt -S lib32-printproto |

− | $ | + | $ yaourt -S lib32-libxp |

− | $ | + | $ yaourt -S lib32-libxpm |

My system is not a fresh install so there may be some other packages needed. | My system is not a fresh install so there may be some other packages needed. | ||

Line 45: | Line 45: | ||

After that you'll need to edit the {MATLAB}/bin/matlab script to get the java settings correct. After the comments at the top of the file, you'll need the line | After that you'll need to edit the {MATLAB}/bin/matlab script to get the java settings correct. After the comments at the top of the file, you'll need the line | ||

− | export MATLAB_JAVA={Path of JRE} | + | export MATLAB_JAVA={Path of JRE} |

Where {Path of JRE} will be /opt/java/jre if you're using Sun's JRE. The path is one level up from where rt.jar is located. That is, rt.jar should be in /opt/java/jre/libs if you used /opt/java/jre for MATLAB_JAVA. | Where {Path of JRE} will be /opt/java/jre if you're using Sun's JRE. The path is one level up from where rt.jar is located. That is, rt.jar should be in /opt/java/jre/libs if you used /opt/java/jre for MATLAB_JAVA. | ||

Line 51: | Line 51: | ||

To run it, you'll need to: | To run it, you'll need to: | ||

− | $ cd {MATLAB}/bin/matlab -glnx86 -desktop | + | $ cd {MATLAB}/bin/matlab -glnx86 -desktop |

− | At this point you may have to resolve more library dependencies or troubleshoot Java. | + | At this point you may have to resolve more library dependencies or troubleshoot Java. Your version of Matlab may need a specific version of Sun's JRE installed. |

=== General === | === General === |

## Revision as of 08:04, 24 December 2009

## Contents

## For the 32bit student edition 2008b

### x86

Just install (might require a few extra packages, but then can be install via pacman. (I will try to make a list when I install next)

For graphical install and interface libxp is needed.

pacman -S libxp

Install from iso file

modprobe loop mount -o loop matu2k8b.iso /media/iso/ /media/iso/install

### x86_64

These are instructions for the installation of 32-bit Matlab on a 64-bit system. Unfortunately, 32-bit is the only version available to students; 64-bit versions are available if you pay more money. These instructions have been updated for the student r2009A version - however the instructions should work with any current version of Matlab. To start off with we need to install a bunch of lib32 packages, not all found with pacman. Check the AUR for lib32-printproto, lib32-libxp and lib32-libxpm. Install lib32-printproto first, because it's required by lib32-libxp.

$ pacman -S lib32-mesa $ pacman -S lib32-glibc $ pacman -S lib32-libxmu $ pacman -S lib32-zlib $ pacman -S lib32-ncurses $ pacman -S lib32-libxtst $ pacman -S lib32-libxi

$ yaourt -S lib32-printproto $ yaourt -S lib32-libxp $ yaourt -S lib32-libxpm

My system is not a fresh install so there may be some other packages needed.

Once they are installed

$ ./install -glnx86

After fixing any library dependency problems, you will be able to guide the installer through the install process. If activation doesn't work in the installer you'll need to login to Wolfram's site and download a license file which you'll put in {MATLAB}/licenses. After the install process, you'll need to create a symbolic link because the installer oddly thinks it's installing the 64-bit version of Matlab:

$ cd {MATLAB}/sys/java/jre $ ln -s glnx86 glnxa64

In the above, {MATLAB} should be replaced by the root directory you chose for your installation.

After that you'll need to edit the {MATLAB}/bin/matlab script to get the java settings correct. After the comments at the top of the file, you'll need the line

export MATLAB_JAVA={Path of JRE}

Where {Path of JRE} will be /opt/java/jre if you're using Sun's JRE. The path is one level up from where rt.jar is located. That is, rt.jar should be in /opt/java/jre/libs if you used /opt/java/jre for MATLAB_JAVA.

To run it, you'll need to:

$ cd {MATLAB}/bin/matlab -glnx86 -desktop

At this point you may have to resolve more library dependencies or troubleshoot Java. Your version of Matlab may need a specific version of Sun's JRE installed.

### General

As one installs matlab, it might complain that there isn't a package, for the most part just look at the package name and then install it with pacman, or in the case of x86_64 there are some libraries only in AUR.

### Nvidia OpenGL Acceleration

Once matlab is installed type

>> opengl info Version = 2.1.2 NVIDIA 177.82 Vendor = NVIDIA Corporation Renderer = Quadro NVS 140M/PCI/SSE2 MaxTextureSize = 8192 Visual = 0x21 (TrueColor, depth 16, RGB mask 0xf800 0x07e0 0x001f) Software = false # of Extensions = 144 Driver Bug Workarounds: OpenGLBitmapZbufferBug = 0 OpenGLWobbleTesselatorBug = 0 OpenGLLineSmoothingBug = 0 OpenGLClippedImageBug = 1 OpenGLEraseModeBug = 0

That is what it should look like. If you have a graphics card but it is using Software = true then you have a problem. With the nvidia card all I needed to do to get it working was copy the libGLU.so from the matlab installed library /usr/local/matlab/sys/opengl/lib/glnx86/libGLU.so to /usr/lib directory. NOTE in x86_64 this might be a different directory.