rsmenon / MATLink

Communicate with MATLAB from Mathematica
matlink.org
68 stars 14 forks source link

Cannot make Matlink 1.1 work with Matlab2021b/Mathematica 13.1 #119

Open Arjay-El opened 1 year ago

Arjay-El commented 1 year ago

I set up MATLink in the stated directory. SystemOpen@FileNameJoin[{$UserBaseDirectory, "Applications"}] -> I placed directory MATLink there.

Cell code Input: Needs["MATLink`"] OpenMATLAB[] MEvaluate["mat = magic(4)"]

Output: $Failed ...OpenMATLAB: Could not open a connection to MATLAB ... MEvaluate: The MATLAB workspace is already closed

The logfile states; Mon 26 Dec 2022 20:46:37 fatal Could not open a connection to MATLAB.
Mon 26 Dec 2022 20:46:37 warning The MATLAB workspace is already closed. Mon 26 Dec 2022 20:51:40 fatal Could not open a connection to MATLAB.
Mon 26 Dec 2022 20:51:40 warning The MATLAB workspace is already closed. Mon 26 Dec 2022 20:55:31 fatal Could not open a connection to MATLAB.
Mon 26 Dec 2022 20:55:31 warning The MATLAB workspace is already closed.

I have matlab and mathematica pathed properly.

In Mathematica, it gives me autocompletion for OpenMATLAB so its seems to have the app loaded.

In matlab, executing [reg,msg]= regmatlabserver gives

[s,msg]=regmatlabserver s = 0 msg = 0×0 empty char array

Is there a way to troubleshoot this?

szhorvat commented 1 year ago

Please post the output of

Needs["MATLink`"]
MATLink`GetInfo[]
Arjay-El commented 1 year ago

Copied code into cell and executed it. I see Math1.png

Added a space between MATLink` and GetInfo[]. I see Math2.png.

Math2 Math1

szhorvat commented 1 year ago

I'm sorry, I meant

MATLink`Developer`GetInfo[]
Arjay-El commented 1 year ago
MATLink 1.1 for Windows (Fri 15 Aug 2014)

13.1.0 for Microsoft Windows (64-bit) (August 14, 2022)

Force 32-bit engine: False

System PATH:

C:\Program Files\Wolfram Research\Mathematica\13.1\SystemFiles\Libraries\Windows-x86-64

C:\Program Files\Wolfram Research\Mathematica\13.1

C:\Program Files\Wolfram Research\Mathematica\13.1\SystemFiles\FrontEnd\Binaries\Windows-x86-64

C:\Program Files\Wolfram Research\Mathematica\13.1\SystemFiles\Kernel\Binaries\Windows-x86-64

C:\Users\rjlil\AppData\Roaming\Mathematica\Applications\MATLink\Engine\bin\Windows64

C:\Users\rjlil\AppData\Roaming\Mathematica\Applications\MATLink

C:\Program Files\MATLAB\R2021b\bin\win64

C:\Program Files\GLE\bin

C:\scimax\hunspell\bin

C:\Windows\System32

C:\Program Files\dotnet\

C:\Program Files\Sigview\julia\bin

C:\Program Files\IDM Computer Solutions\UltraFinder

C:\WINDOWS\system32

C:\WINDOWS

C:\WINDOWS\System32\Wbem

C:\WINDOWS\System32\WindowsPowerShell\v1.0\

C:\WINDOWS\System32\OpenSSH\

C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR

C:\Program Files (x86)\Simply Fortran 3\mingw-w64\bin

C:\Program Files (x86)\Simply Fortran 3\mingw-w64\x86_64-w64-mingw32\lib32

C:\Program Files (x86)\Simply Fortran 3\mingw-w64\x86_64-w64-mingw32\lib64

C:\Program Files (x86)\Silverfrost\FTN95

C:\Users\rjlil\AppData\Roaming\Mathematica\Applications\MATLink

C:\Program Files\GLE\bin

C:\Windows\System32

C:\Users\rjlil\anaconda3\Library\mingw-w64\bin

C:\Users\rjlil\anaconda3\Library\usr\bin

C:\Users\rjlil\anaconda3\Library\bin

C:\Users\rjlil\anaconda3\Scripts

C:\msys64\usr\local

C:\msys64\usr\bin

C:\Program Files\R\R-4.2.1\bin

C:\sqlite3

C:\Graphviz\bin

C:\Program Files\OpenSCAD

C:\Program Files\OpenSCAD\libraries

C:\Program Files\MATLAB\R2021b\bin\win64

C:\scimax\emacs-win\libexec\emacs\27.2\x86_64-w64-mingw32

C:\Program Files\GNU Octave\Octave-7.1.0\mingw64\bin

C:\Users\rjlil\AppData\Local\Microsoft\WindowsApps

C:\MiKTeX\miktex\bin\x64\

C:\Program Files\wkhtmltopdf\bin

C:\Users\rjlil\AppData\Local\Programs\Julia-1.7.2\bin

C:\Users\rjlil\AppData\Local\Programs\Quarto\bin

C:\Users\rjlil\AppData\Local\Markdown Monster

C:\Users\rjlil\AppData\Local\Pandoc\

C:\Users\rjlil\AppData\Local\Programs\Microsoft VS Code\bin

C:\Users\rjlil\AppData\Local\Microsoft\WindowsApps

COM server information:

CLSID: {3DC1B03D-D5F0-418B-ADC5-8268DAED7DDB}

Program ID: Matlab.Application (Version 9.11)

Command: C:\Program Files\MATLAB\R2021b\bin\win64\MATLAB.exe /MLAutomation

From: Szabolcs Horvát @.> Sent: Tuesday, December 27, 2022 2:17 PM To: rsmenon/MATLink @.> Cc: Arjay-El @.>; Author @.> Subject: Re: [rsmenon/MATLink] Cannot make Matlink 1.1 work with Matlab2021b/Mathematica 13.1 (Issue #119)

I'm sorry, I meant

MATLinkDeveloperGetInfo[]

— Reply to this email directly, view it on GitHub https://github.com/rsmenon/MATLink/issues/119#issuecomment-1366122212 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVZSNZQDCEGGJMGAJJ4BT3WPM6DNANCNFSM6AAAAAATKA6MHU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ACVZSN5IFO3M3RAOE5FQB3DWPM6DNA5CNFSM6AAAAAATKA6MHWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSRNVPOI.gif Message ID: @. @.> >

TooVooT commented 1 year ago

I also have the same trouble, with same version Matlab and Mathematica.

Arjay-El commented 1 year ago

I had to make sure all the Matlink folders had a path to them, then gave all the files admin permission. That made it work. It seems to be a permission issue. I did not go back and take the admin status off all the files one by one to see which file was causing the problem. Its running and I have left it as is.

From: Kaerka @.> Sent: Sunday, February 12, 2023 7:35 AM To: rsmenon/MATLink @.> Cc: Arjay-El @.>; Author @.> Subject: Re: [rsmenon/MATLink] Cannot make Matlink 1.1 work with Matlab2021b/Mathematica 13.1 (Issue #119)

I also have the same trouble, with same version Matlab and Mathematica.

— Reply to this email directly, view it on GitHub https://github.com/rsmenon/MATLink/issues/119#issuecomment-1427021823 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVZSN3LDDAXBXN22HU5F7DWXDKGBANCNFSM6AAAAAATKA6MHU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ACVZSN55IECR62M66DTYGWDWXDKGBA5CNFSM6AAAAAATKA6MHWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSVB2P76.gif Message ID: @. @.> >

1375827013 commented 3 weeks ago

So,how to solve the problem