mykb/docs/matlab.md

64 lines
2.1 KiB
Markdown
Raw Normal View History

2022-03-07 11:32:50 +01:00
# 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.
2022-05-24 11:25:49 +02:00
### mv cannot stat error
In the case of an error in the form of:
`mv: cannot stat 'dependency_links.txt'$'\n''PKG-INFO'$'\n''SOURCES.txt'$'\n''top_level.txt': No such file or directory`
Edit line 207 of the `PKGBUILD` to include `ls -d` instead of just `ls`.
2022-03-07 11:32:50 +01:00
## 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.
2022-05-24 11:25:49 +02:00
### Fonts malformed
Set Aliasing to true under `Preferences->MATLAB->Fonts` and reboot.