I tried both and, after making some corrections (because are meant for Julia 0.6), I was able to compile the mex file. Following the instructions on the README of both mexjulia and jlcall I was not able to execute the simple jl.call('2+2').
Several issues and in most of the times the MATLAB crashes.
I didn’t even try (didn’t need to), but I’ve called in the other direction. And also to Octave (a MATLAB clone).
That’s not a really useful to know information (unless you can do callbacks), but I bring it up as there may be other options.
I didn’t call Octave directly, I call Python, and through Oct2Py indirectly to Octave (it works, one “bug”, and I posted a workaround elsewhere). It’s not as clean, but basically no boilerplate (I guess would be similar in other direction), looks like e.g. this:
So I was thinking, maybe you can call from MATLAB (or Octave) to Python instead, and then to Julia through pyjulia package. Should work, as I found to Python is a supported MATLAB option:
And something similar for Octave (I’m not sure how good this is):
[For me, I could have used Octave in production, if it was up to me, but I was using it as a cruch while porting, and I actually completed a project, fully ported to Julia. What’s you (long-term) goal?]
It’s not clear to me, that changes much. You need to have julia (the runtime) set up, and not a problem, with calling to Python first you need it set up too. For my direction, there’s no great overhead to call Python, at least way more (still not a problem) from there to Octave (Oct2Py, transmits data back and forth my writing to files).
My understanding is pyjulia is as efficient as PyCall.jl (basically implemented by it, should be same overhead, meaning “no copying”).
Yes, I used your fork
I installed MATLAB.jl on Julia but for the Mex.jl I got an error that it couldn’t find matlab. So, I tried to re-install it and it seemed that it worked, so now both (MATLAB.jl and Mex.jl) are visible in the Julia.
Moving to the MATLAB environment I was not able to find how to compile the mex file…