Finding the Fiber Length of the current joint config

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
baoping xiong
Posts: 8
Joined: Thu Nov 10, 2016 10:21 pm

Finding the Fiber Length of the current joint config

Post by baoping xiong » Tue Apr 25, 2017 7:48 pm

I have the current joint config,what function of opensim i can used in matlab to get the muscle's the Fiber Length.thank you!

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

Re: Finding the Fiber Length of the current joint config

Post by Thomas Uchida » Tue Apr 25, 2017 10:44 pm

The Muscle::getFiberLength() method (https://simtk.org/api_docs/opensim/api_ ... 46468804f4) will return the fiber length corresponding to the specified State:

Code: Select all

fiberLength = myMuscle.getFiberLength(myState);

User avatar
baoping xiong
Posts: 8
Joined: Thu Nov 10, 2016 10:21 pm

Re: Finding the Fiber Length of the current joint config

Post by baoping xiong » Wed Apr 26, 2017 8:23 am

thank you !,i am the first time used opensim in matlab,i don't how to put the joint angle to the state.can you tell me how to put the joint angle to the state?

User avatar
baoping xiong
Posts: 8
Joined: Thu Nov 10, 2016 10:21 pm

Re: Finding the Fiber Length of the current joint config

Post by baoping xiong » Wed Apr 26, 2017 8:24 am

thank you !,i am the first time used opensim in matlab,i don't how to put the joint angle to the state.can you tell me how to put the joint angle to the state?

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Finding the Fiber Length of the current joint config

Post by jimmy d » Wed Apr 26, 2017 9:53 am

The doxygen documentation for coordinates is here; https://simtk.org/api_docs/opensim/api_ ... inate.html

Code: Select all


state = model.initSystem()

% Get a reference to a coordinate.
aCoord = model.getCoordinateSet().get(1);

% set value, in radians
aCoord.setValue(state, 2);



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

Re: Finding the Fiber Length of the current joint config

Post by Thomas Uchida » Wed Apr 26, 2017 11:36 am

i am the first time used opensim in matlab
These pages in the Confluence documentation may be helpful (in case you haven't found them yet):
- http://simtk-confluence.stanford.edu:80 ... g+Commands
- http://simtk-confluence.stanford.edu:80 ... ith+Matlab (note the example scripts at the bottom of this page)

User avatar
baoping xiong
Posts: 8
Joined: Thu Nov 10, 2016 10:21 pm

Re: Finding the Fiber Length of the current joint config

Post by baoping xiong » Wed Apr 26, 2017 9:59 pm

thank you,i know it.

POST REPLY