From 92a56a2decf609c8e5954cd5566be2fb416a4cc5 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Mon, 7 Mar 2022 11:32:50 +0100 Subject: [PATCH] added matlab instructions --- docs/matlab.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ index.md | 1 + 2 files changed, 56 insertions(+) create mode 100644 docs/matlab.md diff --git a/docs/matlab.md b/docs/matlab.md new file mode 100644 index 0000000..18eccb3 --- /dev/null +++ b/docs/matlab.md @@ -0,0 +1,55 @@ +# matlab + +## Installation via AUR + +### PKGBUILD +Download PKGBUILD: `paru -G matlab` + +### Licenses +- Go to [License center](https://www.mathworks.com/licensecenter) on mathworks +- On install and activate tab; select (or create) an appropriate license +- Navigate to download the license file and the file installation key +- Download the **license file** and put the file in the repository +- Copy and paste the **file installation key** in a plain text file + +## create Tarball + +Check, that `libselinux` and `libxcrypt-compat` are installed. Otherwise the installer will exit with error code 42 and no further instructions. +```sh +paru -S --asdeps libselinux libxcrypt-compat +``` + +Then: +- [Download the matlab installer](https://www.mathworks.com/downloads) +- Unpack and launch the installer +- After logging in and accepting license; select `Advanced Options > I want to download without installing` from the top dropdown menu. +- Set the download location to an empty directory called `matlab` +- Select the toolboxes you want. + +After downloading; from the parent directory; do +```sh +tar cf matlab.tar matlab +``` +to create the tarball. The folder here called `matlab` usually is given the download-time as it's name. Rename to `matlab` before compressing. + +Move the matlab.tar to the repository. +Adjust the `pkgver` and `release` vars in the `PKGBUILD` to reflect current release. +Run `makepkg -si` to install. + +## Configuration +### fix graphics driver with intel + +In the case of `libGL error: failed to open iris:`: + +Add to the `matlab` script (`sudo nvim $(which matlab)`) at the top: +```sh +export MESA_LOADER_DRIVER_OVERRIDE=i965 +``` + +### HiDPI Fix +In Matlab: +```m +s = settings;s.matlab.desktop.DisplayScaleFactor +s.matlab.desktop.DisplayScaleFactor.PersonalValue = 2 +``` +This value can be a float. diff --git a/index.md b/index.md index f2f80f3..01de749 100644 --- a/index.md +++ b/index.md @@ -15,6 +15,7 @@ Happy to accept pull requests for new topics! - [rainloop](docs/rainloop.md) webbased email client - [server](docs/ServerSetup.md) short guide for hosting a server - [php](docs/php.md) short guide for getting php up and running with nginx +- [matlab](docs/matlab.md) A proprietary but extensive python alternative with integrated IDE. # Admin