MATLAB does not recognize constructors

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Gauri Desai
Posts: 1
Joined: Tue Apr 11, 2023 6:12 am

MATLAB does not recognize constructors

Post by Gauri Desai » Wed Aug 09, 2023 3:56 pm

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

Tags:

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

Re: MATLAB does not recognize constructors

Post by Thomas Uchida » Wed Sep 06, 2023 2:28 pm

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.

POST REPLY