Skip to content

Commit fb1bc5a

Browse files
authored
The segfault issue with MATLAB versions 2022/2023 is gone on Linux platforms (#215)
* Update README.md warning about segfault issue * Update README.md Add info about updating the MATLAB release in case of segfault * add specific platform warnings regarding issues with R2022/2023 * clarify instructions on how to use different Matlab versions
1 parent bce2d0f commit fb1bc5a

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

README.md

+22-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
## MATLAB
22

3+
| ❗ Windows and MacOS platforms : MATLAB versions R2022 and R2023 do not work with `MATLAB.jl` ❗ <br/> You can use older versions as explained [further down](https://github.com/JuliaInterop/MATLAB.jl#changing_matlab_version). |
4+
|:----:|
35

4-
| :exclamation: ** MATLAB versions 2022 and 2023 trigger a segfault and do not work with `MATLAB.jl`. Maintainers are attempting to diagnose the cause and fix the issue. ** |
5-
|-----------------------------------------|
6+
| ❗ Linux platforms : If you experience problems when starting the MATLAB engine with versions R2022 or R2023, try to [update](https://se.mathworks.com/help/matlab/matlab_env/check-for-software-updates.html) your MATLAB release. |
7+
|:----:|
68

79

810

@@ -29,8 +31,6 @@ This package is composed of two aspects:
2931

3032
**Important**: The procedure to setup this package consists of the following steps.
3133

32-
By default, `MATLAB.jl` uses the MATLAB installation with the greatest version number. To specify that a specific MATLAB installation should be used, set the environment variable `MATLAB_ROOT`.
33-
3434
### Windows
3535

3636
1. For Matlab R2020a onwards, you should be able to go directly to step 2. If you encounter issues, run `matlab -batch "comserver('register')"` in the command prompt. For earlier versions of Matlab, start a command prompt as an administrator and enter `matlab /regserver`.
@@ -60,6 +60,24 @@ By default, `MATLAB.jl` uses the MATLAB installation with the greatest version n
6060
2. From Julia run: `Pkg.add("MATLAB")`
6161

6262

63+
## Changing MATLAB version
64+
65+
By default, `MATLAB.jl` is built using the MATLAB installation with the greatest version number. To specify that a specific MATLAB installation should be used, set the environment variable `MATLAB_ROOT`:
66+
```julia
67+
julia> ENV["MATLAB_ROOT"] = "/usr/local/MATLAB/R2021b" # example on a Linux machine
68+
```
69+
```julia
70+
julia> ENV["MATLAB_ROOT"] = raw"C:\Program Files\MATLAB\R2021b" # example on a Windows machine
71+
```
72+
Replace the path string with the location of the MATLAB folder on your machine. You need to set the path to the `R20XX` folder, not the `matlab` binary.
73+
74+
If you had the package `MATLAB.jl` already installed and built before changing the environment variable, you will need to rebuild it to apply the change:
75+
```julia
76+
julia> using Pkg; Pkg.build("MATLAB")
77+
```
78+
79+
80+
6381
## Usage
6482

6583
### MxArray class

0 commit comments

Comments
 (0)