Closed modisio closed 7 years ago
I am unable to reproduce this problem on OS X.
Are you sure that the MATLABPATH
variable exists in your environment when running Mathematica? It may have gotten "lost" at some point.
Check this with GetEnvironment["MATLABPATH"]
in Mathematica.
Please let us know your operating system too.
This is on Windows. MATLABPATH is a defined User Environment variable in "System Properties". It is picked up by matlab, and is showing up in a shell (echo $MATLABPATH). And yet GetEnvironment["MATLABPATH"] in Mathematica returns None.
This confirms that the problem is not with MATLink.
It is either with the way you set the variable, or with the way you started Mathematica (e.g., are you running it under the same user account for which you set the variable? Did you fully restart Mathematica after editing environment variables?)
I double checked that Mathematica picks up environment variables (both user and system ones) on Windows (Windows 10 / M11.1.1). If it didn't, MATLink couldn't even work, as it relies on the appropriate directories being added to the PATH variable.
Since this turned out not to be MATLink related, I am closing this issue.
If you find that Mathematica is not picking up any changes to environment variables, even after restarting the front end, I recommend asking about the problem at http://mathematica.stackexchange.com/
Workaround: Use matlab's
startup.m
, not the environment variableThis is how to see the issue:
In Matlab:
path
returns a list of directories that includes those fromMATLABPATH
In Mathematica:
MEvaluate["path"]
does not list those directories