Accessing ThelenMuscle2003 through model class tree
Posted: Wed Mar 06, 2013 8:21 am
I am attempting to access properties of a specific muscle type through the model tree using the Matlab API interface. However, I am unsure how to go from the Muscle class to the ThelenMuscle2003 class. ie
import org.opensim.modeling.*
modelName = Test.osim;
Model = model(modelName);
MuscleSet = Model.getMuscles();
Muscle1 = MuscleSet.get(0);
activationTimeConstant = Muscle1.getActivationTimeConstant();
When I run the line:
activationTimeConstant = Muscle1.getActivationTimeConstant();
I receive the following error:
No appropriate method, property, or field getActivationTimeConstant for class org.opensim.modeling.Muscle
This makes sense considering the muscle class does not have access to the that function. However, I would like to have access to that function. Is there a way to traverse the model tree to obtain access to that class instance?
import org.opensim.modeling.*
modelName = Test.osim;
Model = model(modelName);
MuscleSet = Model.getMuscles();
Muscle1 = MuscleSet.get(0);
activationTimeConstant = Muscle1.getActivationTimeConstant();
When I run the line:
activationTimeConstant = Muscle1.getActivationTimeConstant();
I receive the following error:
No appropriate method, property, or field getActivationTimeConstant for class org.opensim.modeling.Muscle
This makes sense considering the muscle class does not have access to the that function. However, I would like to have access to that function. Is there a way to traverse the model tree to obtain access to that class instance?