Share 
Follow 
AboutDownloadsDocumentsForumsSource CodeIssuesNews
Date:
2023-08-17 15:29
Priority:
3
State:
Open
Submitted by:
Luke Sarantos (lukesarantos7)
Assigned to:
Nobody (None)
Summary:
Configuring With Matlab

Detailed description
Hello,
I am hoping to use Opensim in our lab to help with data analysis and need to configure with Matlab. Due to administration rights I am running into some issues; when running the confingreOpensim.m file I can only save the new path under the admin account and can not complete the final steps to configure. However, whenever I have my admin login to do this it corrupts the pathdef.m file and Matlab can no longer find any of its internal functions. I have tried to configure using the manual method and the same issues have occured. Are there any other troubleshooting methods to configure with matlab?

Thanks

Add A Comment: Notepad

Message  ↓
Date: 2024-01-12 15:36
Sender: Lorenz Winkler

OpenSim is intended to be linked with MATLAB according to this guide: https://simtk-confluence.stanford.edu:8443/display/OpenSim/Scripting+with+Matlab

However, the linking instructions are not multi-user friendly: In MATLAB's pathtool (Set Path), the path to the OpenSim Scripts Path of a local user profile is set with admin rights. Consequently, when another user logs into Windows and starts MATLAB, severe errors occur, leading to a temporary deactivation of the pathtool.

At our university, we use VMware DEM (a User Environment Management tool) to implement the following predefined settings whenever MATLAB or OpenSIM is launched:

1. The path to the OpenSim Java library, "C:\OpenSim 4.4\sdk\Java\org-opensim-modeling.jar," is added to the file "%AppData%\MathWorks\MATLAB\R2023a\javaclasspath.txt."

2. The path to the C++ libraries of OpenSim, on which the Java library depends, "C:\OpenSim 4.4\bin," is added to the file "%AppData%\MathWorks\MATLAB\R2023a\javalibrarypath.txt."

3. The following content is added to "...\Documents\MATLAB\startup.m":

up = getenv('userprofile');
sub = '\Documents\OpenSim\4.4\Code\Matlab\Utilities';
addpath([up sub])
clearvars up sub

This content adds the OpenSim Matlab Utilities from the script directory of the respective logged-in user to the Matlab PATH variable, but it does so non-permanently, specifically for the current Matlab session. This approach has the advantage that neither the system's "pathdef.m" needs to be modified with admin rights nor does a "pathdef.m" in the Documents folder of the roaming or local user profile need to be created.

All in all, it would be nice if the developers could provide a multi-user-friendly OpenSIM-MATLAB setup to avoid such tinkering.

No Changes Have Been Made to This Item

Feedback