Ligament moment arm in Matlab API
Posted: Thu Nov 08, 2012 9:28 am
Hi,
I want to estimate some knee ligaments properties through an optimization process using API in Matlab.
First, I need to obtain the knee ligaments moment arms using the "ComputeMomentArm" method in the "Ligament" class.
My code to get the moment arms in the default pose is:
But the following error is displayed:
Thanks for your help
Romain
I want to estimate some knee ligaments properties through an optimization process using API in Matlab.
First, I need to obtain the knee ligaments moment arms using the "ComputeMomentArm" method in the "Ligament" class.
My code to get the moment arms in the default pose is:
Code: Select all
myModel = Model('myModel.osim')
aLigament = Ligament();
aLigament.assign(myModel.getForceSet.get('aLigament'));
state = myModel.initSystem();
aCoord = myModel.getCoordinateSet.get('aCoord')
momentArm_aCoord = Lig.computeMomentArm(state,aCoord)
I don't understand what is exactly the cacheVariable and how it should be managed in this particular case. Does anybody can clarify this for me???? Java exception occurred:
java.lang.RuntimeException: ModelComponent::isCacheVariableValid:
ERR- name not found.
for component '' of type GeometryPath
at
org.opensim.modeling.opensimModelJNI.GeometryPath_computeMomentArm(Native
Method)
at
org.opensim.modeling.GeometryPath.computeMomentArm(GeometryPath.java:172)
Thanks for your help
Romain