0
$\begingroup$

I tried to work with MATLink. I have MATLAB R2014b on Win10, and Mathematica 12.0.

I followed all the instructions from the MATLink website, but I did not get any outputs / notifications / something in the matlab interface. I don't get any errors.

here are the lines I wrote in Mathematica (which are taken as examples from MATLink website):

AppendTo[$Path, 
  FileNameJoin[{$UserBaseDirectory, "Applications\\MATLink"}]];
Needs["MATLink`"]
OpenMATLAB[]

MEvaluate["mat = magic(4)"]

also, here is the result of the MATLinkDeveloperGetInfo[] command:

MATLink 1.1 for Windows (Fri 15 Aug 2014)

12.0.0 for Microsoft Windows (64-bit) (April 6, 2019)

Force 32-bit engine: False

System PATH: C:\Program Files\Wolfram Research\Mathematica\12.0\SystemFiles\Libraries\Windows-x86-64 C:\Program Files\Wolfram Research\Mathematica\12.0\SystemFiles\Libraries\Windows C:\Program Files\Wolfram Research\Mathematica\12.0\SystemFiles\Kernel\Binaries\Windows-x86-64 C:\Program Files\Wolfram Research\Mathematica\12.0 C:\Program Files\Wolfram Research\Mathematica\12.0\SystemFiles\FrontEnd\Binaries\Windows-x86-64 C:\Program Files\Wolfram Research\Mathematica\12.0\SystemFiles\Kernel\Binaries\Windows-x86-64 C:\Program Files (x86)\Common Files\Oracle\Java\javapath C:\DLiDlls\ C:\ProgramData\Oracle\Java\javapath C:\windows\system32 C:\windows C:\windows\System32\Wbem C:\windows\System32\WindowsPowerShell\v1.0\ C:\Program Files\MATLAB\R2017a\runtime\win64 C:\Program Files\MATLAB\R2017a\bin C:\Program Files (x86)\QuickTime\QTSystem\ C:\Program Files (x86)\Wolfram Research\WolframScript\ C:\Program Files (x86)\GitExtensions\ C:\Program Files\Git\cmd C:\Program Files\MATLAB\R2014b\runtime\win64 C:\Program Files\MATLAB\R2014b\bin C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL C:\Program Files\Intel\Intel(R) Management Engine Components\DAL C:\Program Files\Intel\WiFi\bin\ C:\Program Files\Common Files\Intel\WirelessCommon\ C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\ C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\ C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\ C:\DLiDlls C:\Users\GMalki\AppData\Local\Microsoft\WindowsApps C:\Program Files\Intel\WiFi\bin\ C:\Program Files\Common Files\Intel\WirelessCommon\ C:\Program Files\MATLAB\R2014b\bin\win64 C:\Program Files\MATLAB\R2017a\bin\win64

COM server information: CLSID: {D309A656-4B0B-47F2-9A27-0C4E9D8735C4} Program ID: Matlab.Application (Version 8.4) Command: C:\Program Files\MATLAB\R2014b\bin\win64\MATLAB.exe /MLAutomation

Can anyone help me to figure out how to transfer data/variables from mathematica to matlab ?? What am I doing wrong ?

Thanks

$\endgroup$
1
  • $\begingroup$ It would be much easier to read the path output if each path were left on a separate line. That is how they appear in the original output. $\endgroup$
    – Szabolcs
    Commented Mar 1, 2020 at 12:36

1 Answer 1

3
$\begingroup$

You must not do this:

AppendTo[$Path, 
  FileNameJoin[{$UserBaseDirectory, "Applications\\MATLink"}]];

If the package won't load without this, then the directory structure you created is not correct. There must not be two nested MATLink/MATLink directories.


I do not see how it is possible that there are not error message at all. Maybe you set the messages to appear in the console and you didn't notice them. Maybe a dialog window popped up behind the notebook and you didn't see it.

From the debug output I can tell that there are inconsistencies in your setup: some paths refer to MATLAB R2014b, some refer to MATLAB R2017a. Please remove one of the two (keep the one for whichever MATLAB you have and works) and re-do the setup steps, including registering the automation server.

$\endgroup$
2
  • $\begingroup$ still not working.... How can I know if the package loaded correctly ? the directory name is \AppData\Roaming\Mathematica\Applications\MATLink I dont have any error messgae. only black pop up window with the title of "mengine 75mum-shm" I corrected the path to be only MATLAB R2014b $\endgroup$
    – GM_jnj
    Commented Mar 3, 2020 at 7:25
  • $\begingroup$ @GM_jnj I need more information to go on. Please describe in detail what you are doing (update the post), starting with launching a fresh Mathematica session. $\endgroup$
    – Szabolcs
    Commented Mar 3, 2020 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.