1 minute read

installation:

  1. installation
    1. download matlab iso files
    2. mount first cd
    3. run the installer (install.sh or similar) from within $HOME: $ cd $HOME; /path/to/cd1/install.sh
    4. choose the install path: /opt/MATLAB
    5. when asked for second cd one has to unmount cd1 and mount cd2 to the same path
  2. put matlab in your $PATH:
    1. usually this is done in the installation process, but just in case
    2. $ sudo ln -s /opt/MATLAB/R2017a/bin/matlab /usr/local/bin/matlab
  3. get the desktop file for matlab (somewhere in the opt/matlab folder?)
    1. [code language="bash" collapse="true" padlinenumbers="true" title="cat matlab.desktop"]
      $ cat /usr/share/app-install/desktop/matlab-support:matlab.desktop
      [Desktop Entry]
      X-AppInstall-Package=matlab-support
      X-AppInstall-Popcon=4
      X-AppInstall-Section=multiverse

      Version=1.0
      Type=Application
      Terminal=false
      Exec=matlab -desktop
      Name=MATLAB
      Icon=/usr/share/icons/matlab.png
      Categories=Development;Math;Science
      Comment=Scientific computing environment
      StartupNotify=true
      StartupWMClass=com-mathworks-util-PostVMInit

      X-Ubuntu-Gettext-Domain=app-install-data

      [/code]

  4. for updating matlab
    1. install as in step 1
    2. change the link path from step 2
    3. done
  5. change the default start of matlab by creating a custom startup.m:
    1. print the path inside of the matlab gui: >> path
    2. choose a good path for your file (usually: /opt/MATLAB/R2017a/toolbox/local/startup.m or ~Documents/MATLAB/startup.m)
    3. insert some matlab code. example:[code language="matlab" collapse="true" padlinenumbers="true" title="cat startup.m"]
      fname='/some/path';
      addpath(genpath(fname));
      cd(fname);
      clear fname;
      [/code]