I would be grateful if someone could tell me how to change manual scale factors using MATLAB and OpenSim 4.0.
I would like to systematically change manual scaling factors defined in a ScaleTool object (below is the corresponding part in an .xml file) to generate models with different knee heights with the same leg length.
I could get access to the property, but cannot find the way to change the list values in the AbstractProperty class.<ModelScaler>
<Scaleset>
<Scale>
<scales> 1 1 1</scales>
<segment>femur</segment>
<apply>true</apply>
</Scale>
...
I think there would be a more sophisticated way to get access and update the values. I would appreciate any advice.
Code: Select all
a = ScaleTool(filepath)
b = a.getModelScaler();
c = b.getScaleSet();
d = c.getPropertyByIndex(0); % 0: <segment>femur
e = getValueAsObject(0); % 0: <scales>
manualScaleFactorsForFemur = get PropertyByIndex(0);
Yusuke Okita