Non-windows way to call Matlab from Mathematica

This has been asked before , but the solution does not seem to work on MacOS. Wolfram Library has a package for the 7-year-old version of Matlab. Is there a solution that works on MacOS 10.6 and Matlab 7.9?

I want to call CVX from Mathematica

+6
wolfram-mathematica matlab
source share
2 answers

You can use RunThrough["command",expr] , this runs the external command command and passes expr (Mathematica expression) as input to command

An example of a suitable command would be "matlab -r \"matlab expr\"" , you can put your special CVX code in the line "matlab expr".

+2
source share

Update: Right now, probably MATLink is the best way to do this. It runs on Windows / Linux / Mac.

Disclosure: I am one of the authors of MATLink.


Have you tried using mEngine instead ? I can only try on Windows, but, looking at the sources, I believe that this can work on other platforms.

I hope you only need to change main.c , in fact, just copy and paste the main function from one of the MathLink examples (e.g. addtwo), since mEngine main.c removed the non-Windows part. Then compile the package as a MathLink program.

+2
source share

All Articles