Interfacing matlab with opensim

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
AYUSH RAI
Posts: 9
Joined: Sat Apr 06, 2019 2:26 am

Interfacing matlab with opensim

Post by AYUSH RAI » Mon May 20, 2019 3:44 am

Hi,
I am trying to interface opensim4.0 using matlab and after running "org.opensim.modeling.opensimCommon.GetVersion()" in command prompt I am getting this:


Failed to load one or more dynamic libraries for OpenSim.
java.lang.UnsatisfiedLinkError: C:\OpenSim 4.0\bin\osimJavaJNI.dll: The specified procedure could not be found
Make sure OpenSim's bin directory is on your PATH.
See https://simtk-confluence.stanford.edu/d ... ith+Matlab
Java exception occurred:
java.lang.UnsatisfiedLinkError: org.opensim.modeling.opensimCommonJNI.GetVersion()Ljava/lang/String;

at org.opensim.modeling.opensimCommonJNI.GetVersion(Native Method)

at org.opensim.modeling.opensimCommon.GetVersion(opensimCommon.java:25)

Can anyone explaing in simple steps how to resove this? P.S. I am not very much of a computer science expert.

Tags:

User avatar
Thomas Uchida
Posts: 1790
Joined: Wed May 16, 2012 11:40 am

Re: Interfacing matlab with opensim

Post by Thomas Uchida » Mon May 20, 2019 6:26 am

There's a "Troubleshooting" section at the bottom of the "Scripting with Matlab" page in the Confluence documentation (linked in the error message; https://simtk-confluence.stanford.edu:8 ... ith+Matlab). Please see the third and fourth items in the list. I can't tell which OS you're using, so I'll assume you're using Windows 10. To edit your Windows PATH environment variable, open the Start menu and type "Edit the system environment variables". In the "System Properties" window that appears, click the "Environment Variables..." button. Under "System variables", select the "Path" variable and click "Edit...". If it isn't there already, add "C:\OpenSim 4.0\bin" to the list (your installation directory may differ) and remove any entries from previous OpenSim versions. If this directory was already in the list, please follow the instructions on the "Scripting with Matlab" page for installing Microsoft Visual C++ Redistributable Package.

User avatar
AYUSH RAI
Posts: 9
Joined: Sat Apr 06, 2019 2:26 am

Re: Interfacing matlab with opensim

Post by AYUSH RAI » Tue May 21, 2019 9:52 pm

Thank you very much. That worked

POST REPLY