Hi All,
I have experience with both OpenSim and MATLAB, but I am having a difficult time understanding how they fit together. I have already found how to load my model, but I am not sure how to apply a .mot to it and then extract the muscle length data (as a function of the motion) to store into a MATLAB structure. Is there a library somewhere that shows all of the usable OpenSim functions in MATLAB? I am not sure where all of the functions in the MATLAB examples are coming from. I found a method for finding this information exclusively through the OpenSim GUI, but I am hoping to write MATLAB code to automate the process. Any help is appreciated.
Colton
Calculating Muscle Lengths in MATLAB using OpenSim
- Colton Sauer
- Posts: 10
- Joined: Tue May 05, 2015 12:18 pm
Re: Calculating Muscle Lengths in MATLAB using OpenSim
There are just to many functions to hand make a library for. We tried to automate it but we couldn't find worthwhile methods. The OpenSim Doxygen site (https://simtk.org/api_docs/opensim/api_docs/) has all the documentation for functions. Granted, it is hard for Matlab users (non C++) to understand at first. It took me a long time to get a hang of it and not all the functions are made available in Matlab.
I have some example code that does something similar to what you want to do; https://github.com/jimmyDunne/stackJimm ... LfromMot.m
Cheers,
-james
I have some example code that does something similar to what you want to do; https://github.com/jimmyDunne/stackJimm ... LfromMot.m
Cheers,
-james
- Colton Sauer
- Posts: 10
- Joined: Tue May 05, 2015 12:18 pm
Re: Calculating Muscle Lengths in MATLAB using OpenSim
Thank you for the example code! It shows how to access the normalized fiber lengths, which was exactly what I was trying to find.