# \[ANN\] JuliaFromMATLAB.jl - Call Julia from MATLAB

**URL:** https://discourse.julialang.org/t/ann-juliafrommatlab-jl-call-julia-from-matlab/66882
**Category:** Package Announcements
**Tags:** interoperability, matlab
**Created:** [August 23, 2021, 11:57pm UTC](https://discourse.julialang.org/t/ann-juliafrommatlab-jl-call-julia-from-matlab/66882 "2021-08-23T23:57:04Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![c42f](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/c42f/32/52842_2.png) [@c42f](https://discourse.julialang.org/u/c42f)
#### Post date: [August 24, 2021, 2:43am UTC](https://discourse.julialang.org/t/ann-juliafrommatlab-jl-call-julia-from-matlab/66882/2 "2021-08-24T02:43:35Z")

</div>

> [@jondeuce](#):
>
> However, for some versions of Julia and MATLAB, supported versions of external libraries may clash.

I’m fairly sure this can be avoided completely because you run your Julia code in a separate operating system process. I haven’t used matlab for a long time, but IIRC the problem here is because matlab likes to set environment variables `LD_LIBRARY_PATH` (and possibly `LD_PRELOAD`?) which breaks the invocation of user executables with matlab’s [`system`](https://www.mathworks.com/help/matlab/ref/system.html) function (sigh… matlab 🤦‍♂️)

This problem is described here: [Why does Matlab set a custom LD\_LIBRARY\_PATH when execting "system" on Linux? - MATLAB Answers - MATLAB Central](https://www.mathworks.com/matlabcentral/answers/181899-why-does-matlab-set-a-custom-ld_library_path-when-execting-system-on-linux)

The solution is to unset the necessary environment variables, or otherwise undo whatever crimes matlab has committed against your OS environment.

---

_[View the full topic](https://discourse.julialang.org/t/ann-juliafrommatlab-jl-call-julia-from-matlab/66882)._
