Finding the Fiber Length of the current joint config
- baoping xiong
- Posts: 8
- Joined: Thu Nov 10, 2016 10:21 pm
Finding the Fiber Length of the current joint config
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!
- Thomas Uchida
- Posts: 1802
- Joined: Wed May 16, 2012 11:40 am
Re: Finding the Fiber Length of the current joint config
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);
- baoping xiong
- Posts: 8
- Joined: Thu Nov 10, 2016 10:21 pm
Re: Finding the Fiber Length of the current joint config
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?
- baoping xiong
- Posts: 8
- Joined: Thu Nov 10, 2016 10:21 pm
Re: Finding the Fiber Length of the current joint config
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?
Re: Finding the Fiber Length of the current joint config
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);
- Thomas Uchida
- Posts: 1802
- Joined: Wed May 16, 2012 11:40 am
Re: Finding the Fiber Length of the current joint config
These pages in the Confluence documentation may be helpful (in case you haven't found them yet):i am the first time used opensim in matlab
- 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)
- baoping xiong
- Posts: 8
- Joined: Thu Nov 10, 2016 10:21 pm
Re: Finding the Fiber Length of the current joint config
thank you,i know it.