Page 1 of 1

MATLAB does not recognize constructors

Posted: Wed Aug 09, 2023 3:56 pm
by gaudesai
Hello!

I am new to using OpenSim (version 4.4) and I'd like to use it in Matlab. I ran the configureOpenSim function and my script includes the import org.opensim.modeling.*; command at the very beginning. Both OpenSim and Matlab are 64 bit. Yet, Matlab is unable to recognize constructors of model classes in the namespace opensim and opensim.modeling. I'd like to use the constructor of model class "Bhargava2004SmoothedMuscleMetabolics" but I am unable to do so. The error I get when trying to create an instance is "Unrecognized function or variable". I have tried to restart Matlab but I still get the same error. I believe Matlab has not properly configured, but I am not sure what else I can do to troubleshoot. Any insights will be helpful!

Thank you!
Gauri

Re: MATLAB does not recognize constructors

Posted: Wed Sep 06, 2023 2:28 pm
by tkuchida
I presume you have followed the instructions on the "Scripting with Matlab" page in the documentation (https://simtk-confluence.stanford.edu:8 ... ith+Matlab). Note that Matlab must be "Run as administrator" for the script to work. Also note the "Troubleshooting" section at the bottom of the page, which might be helpful. Near the top of the page, below the "Test that OpenSim is properly configured with MATLAB" code block, there is a section "Having trouble? Try manual setup..." (click to expand the section); you could try that strategy. Finally, you might also try searching the Forum as a variety of issues have been encountered and solved in the past.