Is it possible to query and set the TendonForceLengthCurve properties thru MATLAB? Particularly strain_at_one_norm_force using osim 3.3?
thanks - josh
tendon compliance - Millard muscle - MATLAB
- Josh Baxter
- Posts: 29
- Joined: Fri Mar 11, 2016 12:29 pm
- Adrian Lai
- Posts: 46
- Joined: Tue Mar 13, 2012 11:33 am
Re: tendon compliance - Millard muscle - MATLAB
Hi Josh,
To do it in MATLAB, you need to safeDownCast the Millard2012EquilibriumMuscle down to the TendonForceLengthCurve of each muscle, set/update the strain and then print the model.
Adrian
To do it in MATLAB, you need to safeDownCast the Millard2012EquilibriumMuscle down to the TendonForceLengthCurve of each muscle, set/update the strain and then print the model.
Adrian
- Josh Baxter
- Posts: 29
- Joined: Fri Mar 11, 2016 12:29 pm
Re: tendon compliance - Millard muscle - MATLAB
thanks adrian.
Code: Select all
% get muscle
thisMuscle = model.getMuscles.get(musclename);
thisMuscleSafe = Millard2012EquilibriumMuscle.safeDownCast(thisMuscle);
% access tendon properiets and edit
tendonprop = thisMuscleSafe.get_TendonForceLengthCurve();
strainatnorm = tendonprop.get_strain_at_one_norm_force();
tendonprop.set_strain_at_one_norm_force(newstrainval);
% save model to new osim file
model.print('new_strain.osim');