Dear sir/Madam,
I have my inverse kinematic results (.mot) and I want to compute muscle moment arms around each coordinate in each time step using MATLAB. As I understood, Muscle.computeMomentArm(State , Coordinate) is a function that can do this for each muscle and the inputs of this class are a state and a coordinate. I am able to compute moment arms for each muscle in the initial position because I can get both the initial state and the coordinate from my model; however, I cannot deal with .mot file and get the required state. How should I get the state in each time step from my inverse kinematic file? I tried "Storage", but still I don't know how to access the state in each time step? I would appreciate that if anybody can help me with this issue.
Thanks,
Mohammad
Computing Muscle Moment Arms
- Mohammadhossein Akhavanfar
- Posts: 19
- Joined: Mon Oct 16, 2017 9:11 am
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: Computing Muscle Moment Arms
Have you tried the getData() and getDataAtTime() methods? See the API documentation for the Storage class here: https://simtk.org/api_docs/opensim/api_ ... orage.html.I tried "Storage", but still I don't know how to access the state in each time step?
Alternatively, you could try using the "ReadOpenSimData.m" MATLAB script here: https://simtk.org/frs/download.php?file_id=3862 (links to a ZIP file from the "Dynamic Walker Competition January 2014" page in the Confluence documentation, https://simtk-confluence.stanford.edu:8 ... nuary+2014). The script is in the UserFunctions directory.