Difference between revisions of "Matlab"

From Cncz
Jump to navigation Jump to search
m
 
(4 intermediate revisions by 2 users not shown)
Line 21: Line 21:
  
 
[nl]Op de door C&CZ beheerde machines met MS-Windows of Linux is Matlab beschikbaar.[/nl] [en]Matlab is available on the MS-Windows and Linux machines managed by C&CZ.[/en]
 
[nl]Op de door C&CZ beheerde machines met MS-Windows of Linux is Matlab beschikbaar.[/nl] [en]Matlab is available on the MS-Windows and Linux machines managed by C&CZ.[/en]
 +
 +
===[Integrating Matlab in Python][Integrating Matlab in Python] ===
 +
 +
[nl]
 +
Het is mogelijk Matlab te gebruiken vanuit python, zie [https://nl.mathworks.com/help/matlab/matlab-engine-for-python.html matlab-engine-for-python].
 +
Op alle Linux clients en servers is dit al voorbereid voor Matlab R2020a en R2019b. Zie /opt/matlab-*/Matlab-Python.Readme voor details.
 +
[/nl]
 +
[en]
 +
It is possible to use Matlab in python, see [https://nl.mathworks.com/help/matlab/matlab-engine-for-python.html matlab-engine-for-python].
 +
On all Linux clients and servers this has been setup for Matlab R2020a and R2019b. See /opt/matlab*/Matlab-Python.Readme for details.
 +
[/en]
  
 
===[Online Matlab cursus][Online Matlab course] ===
 
===[Online Matlab cursus][Online Matlab course] ===
Line 40: Line 51:
 
Activation Key that [[Contact|C&CZ]] can provide.
 
Activation Key that [[Contact|C&CZ]] can provide.
 
[/en]
 
[/en]
 
=== [Installatie op een Windows PC][Installation on a Windows PC] ===
 
 
[nl]
 
** Zet de <tt>license.dat</tt>, die je via mail van C&amp;CZ ontvangen hebt, ergens op je harde schijf. Zelf een <tt>license.dat</tt> maken, kan bv. met <tt>Kladblok/Notepad</tt>, door het bestand op te slaan als Type: "alle typen" en Naam: "license.dat". De inhoud van die <tt>license.dat</tt> bestaat uit 2 regels die er ongeveer zo uit zien:
 
[/nl]
 
[en]
 
** Put the <tt>license.dat</tt>, that C&amp;CZ mailed you, somewhere on your hard disk. You can create a file called <tt>license.dat</tt> by starting <tt>Notepad</tt> and saving it as Type: "all" and Name: "license.dat". The file <tt>license.dat</tt> contains 2 lines that look like:
 
[/en]
 
 
        SERVER matlabnew.science.ru.nl .... .....
 
        USE_SERVER
 
 
[nl]
 
** Stop de software DVD erin of kopi&euml;er de GEHELE inhoud van een Matlab-map uit de netwerk-schijf <tt>\\install\install\science</tt> ergens naar de harde schijf van je PC. Als je eerst het zip-file uit moet pakken, doe dat dan met 7-ZIP. Pak de 32-bits of 64-bits Windows installer, afhankelijk van je OS. Je kunt zien welk OS je hebt, door rechts te klikken op Computer en dan te kijken bij Eigenschappen.
 
[/nl]
 
[en]
 
** Insert the software DVD or copy the COMPLETE contents of a Matlab directory of the network drive <tt>\\install\install\science</tt> to someplace on your hard drive. If you have to unzip, use 7-ZIP to do so. Choose the 32-bit or 64-bit Windows installer, depending on your OS. You can see the OS-version by right-clicking on Computer and choosing Properties.
 
[/en]
 
** [Kies][Choose] "Install manually without using the Internet".
 
** [Klik op][Check] "I have the File Installation Key"
 
** [nl]Geef de 'File Installation Key' die je via mail van C&amp;CZ ontvangen hebt, van de vorm:[/nl] [en]Enter the File Installation Key' that C&amp;CZ sent by mail. It looks like:[/en]
 
 
        ?????-?????-?????-?????-?????-?????-?????-?????-?????-?????
 
 
** [Kies][Choose] "Typical Installation"
 
** [nl]Wijs de map waar je de <tt>license.dat</tt> bewaard hebt, aan.[/nl][en]Point to the directory where you stored the <tt>license.dat</tt>.[/en]
 
** [nl]Daarna zou de installatie vanzelf moeten gaan.[/nl][en]After that, the installation should be no problem.[/en]
 
 
=== [Installatie op een Linux PC][Installation on a Linux PC] ===
 
 
** [nl]Neem contact op met C&amp;CZ voor de huidige licentiefiles (kort en lang) en File Installation Key.[/nl] [en]Contact C&amp;CZ for the current license file and File Installation Key.[/en]
 
** [nl]Wordt evt. [/nl][en]Become (if you want) [/en] <tt>root</tt>
 
** <tt>mkdir /usr/local/matlab</tt>
 
** <tt>mkdir /usr/local/matlab/etc</tt>
 
** <tt>cp -p license.dat /usr/local/matlab/etc/license.dat</tt><br /> [nl]De <tt>license.dat</tt> ziet er ongeveer zo uit (2 regels!):[/nl] [en]The <tt>license.dat</tt> looks like (2 lines!):[/en]
 
 
          SERVER matlabnew.science.ru.nl ...
 
          USE_SERVER
 
 
** <tt>cd /usr/local/matlab</tt>
 
* [nl]Als je installeert vanaf het netwerk:[/nl][en]If you install from the network:[/en]
 
** [nl]Kopieer de software naar je harde schijf en unzip het zip-bestand.[/nl][en]Copy the software to your local drive and unzip the zip file.[/en]
 
** [nl]Als je de unzipped files kopieert naar een andere dir, zorg dan dat je permissie behoudt door gebruik te maken van: [/nl][en]If you copy the unzipped files to another directory, make sure you preserve permission by using: [/en]<tt>cp -p</tt>
 
* [nl]Als je installeert van DVD:[/nl][en]If you install from DVD:[/en]
 
** [nl]Voer the DVD in en[/nl][en]Insert the DVD and[/en] <tt>mount /mnt/cdrom</tt> [nl]als dat niet automatisch gebeurt[/nl][en]if that doesn't happen automatically[/en].
 
* [nl]Start de Linux installer, bijvoorbeeld met: [/nl][en]Start the Linux installer, for example with: [/en]<tt>./install</tt>
 
** [nl]Kies om te installeren '*without* using the internet'.[/nl][en]Choose to install '*without* using the internet'.[/en]
 
** [nl]Accepteer de licentie.[/nl][en]Accept the license agreement.[/en]
 
** [nl]Geef de "File Installation Key" die je van C&CZ ontvangen hebt.[/nl][en]Enter the "File Installation Key" that you received from C&amp;CZ.[/en]
 
** [nl]Kies bij "installation type" de optie "typical".[/nl][en]Choose installation type "typical".[/en]
 
** [nl]Kies om te installeren in de default installation folder.[/nl][en]Install in the default installation folder.[/en]
 
** [nl]Geef nu het pad naar de license.dat die je van C&CZ ontvangen hebt. Dit pad is: [/nl][en]Enter the path to the license.dat that you received from C&amp;CZ. This should be: [/en]<tt>/usr/local/matlab/etc/license.dat</tt>
 
* [nl]Als je graag Matlab opstart door simpelweg "matlab" in een terminal te typen, dan kan je dat voor elkaar krijgen door een link te maken. Aangenomen dat je je de "default installation folder" hebt gebruikt, kan je deze link maken via (check ook versie nummer): [/nl][en]If you wish to launch Matlab simply by typing "matlab" in a terminal, you can do that by creating a link. Assuming you have installed matlab in the default installation folder this is done by (check version) [/en]<tt> sudo ln -s /usr/local/MATLAB/R2012a/bin/matlab /usr/bin/matlab</tt>
 
  
 
==[nl]Bekende problemen:[/nl][en]Known problems[/en]==
 
==[nl]Bekende problemen:[/nl][en]Known problems[/en]==
 
===You elected not to overwrite the contents ...===
 
[nl]
 
Als je de foutmelding krijgt: "You elected not to overwrite the contents of the current installation folder. ..." dan ben je waarschijnlijk vergeten ook de "*common*" files van de Install-schijf te kopi&euml;ren.
 
[/nl]
 
[en]
 
When you get the error "You elected not to overwrite the contents of the current installation folder. ...", then you probably forgot to copy the "*common*" files from the Install network share.
 
[/en]
 
  
 
===[Toolkit problemen na upgrade naar nieuwe versie][Toolkit problems after upgrading to new version]===
 
===[Toolkit problemen na upgrade naar nieuwe versie][Toolkit problems after upgrading to new version]===
Line 111: Line 60:
 
[en]A toolkit seems to be missing, the reason might be a Matlab searchpath that has not been adjusted for the new version. See [http://www.mathworks.com/help/techdoc/matlab_env/br7ppws-1.html#br7poxu-10 Mathworks help1] and [http://www.mathworks.com/help/techdoc/matlab_env/br7ppws-1.html#br8p4gj-1 Mathworks help2]. A fast fix, in Matlab is:[/en]
 
[en]A toolkit seems to be missing, the reason might be a Matlab searchpath that has not been adjusted for the new version. See [http://www.mathworks.com/help/techdoc/matlab_env/br7ppws-1.html#br7poxu-10 Mathworks help1] and [http://www.mathworks.com/help/techdoc/matlab_env/br7ppws-1.html#br8p4gj-1 Mathworks help2]. A fast fix, in Matlab is:[/en]
 
  restoredefaultpath; matlabrc
 
  restoredefaultpath; matlabrc
 
===Redhat / Fedora Linux [installatie][installation]===
 
[Als je de foutmelding krijgt:][If you get the error message:]
 
 
/media/MATHWORKS_R2008A/update/bin/glnx86/xsetup:
 
error while loading shared libraries:
 
libXp.so.6: cannot open shared object file: No such file or directory
 
 
[installeer dan de ontbrekende software via iets als:][install the missing software through something like:]
 
 
root# yum install libXp.so.6
 
 
 
   
 
   
 
===Firewalls===
 
===Firewalls===

Latest revision as of 01:36, 6 December 2021

Matlab

Matlab, a `matrix laboratory' for interactive scientific calculations of The Mathworks Inc. is an integrated software package, it combines numeric calculations, data visualization and a programming language.

License

A number of departments in the university have bought shares in the network license that C&CZ has arranged for the use of Matlab. When one has bought a share, one can get the software and installation/licensing keys of Matlab for either Linux, Mac or MS-Windows, also for older versions of Matlab, from C&CZ system administration.

This network license with a lot of toolboxes can only be used by computers on the Internet. For standalone use, one can try to use a free alternative like Scilab or Octave. The license purchase costs for on average 1 concurrent Matlab-user are EUR 241,- excl. VAT. The average is determined by counting the maximum number of concurrent users in each week. These maxima are then averaged over the whole year. Maintenance costs depend on the number of users, but are roughly EUR 50,- per year.

When a department regularly uses Matlab without yet having bought a share in the network license, one should contact Astrid Linssen. The use of Matlab is logged on the license server. At the end of each year C&CZ calculates the average peak-use per week of each department, this should correspond to the number of Matlab-licenses bought. During the highest peak-use a department thus uses more licenses than bought, but this is no problem due to the shared network license: not all departments peak at the same time.

Matlab is available on the MS-Windows and Linux machines managed by C&CZ.

Integrating Matlab in Python

It is possible to use Matlab in python, see matlab-engine-for-python. On all Linux clients and servers this has been setup for Matlab R2020a and R2019b. See /opt/matlab*/Matlab-Python.Readme for details.

Online Matlab course

If your department has a Matlab license and you want to learn Matlab interactively with the Matlab Academy (Mathworks Training Services), visit the Matlab Academy and create an account with an email address ending in: @science.ru.nl, @donders.ru.nl, @pwo.ru.nl, @let.ru.nl, @fm.ru.nl, @ai.ru.nl, @socsci.ru.nl or @ru.nl, and use the Activation Key that C&CZ can provide.

Known problems

Toolkit problems after upgrading to new version

A toolkit seems to be missing, the reason might be a Matlab searchpath that has not been adjusted for the new version. See Mathworks help1 and Mathworks help2. A fast fix, in Matlab is:

restoredefaultpath; matlabrc

Firewalls

  • When one is separated from the license server by a firewall, one needs to open 2 ports: one on which the license server is listening and 1 return portnumber. Contact C&CZ for details, the portnumbers might change due to an upgrade of Matlab.