Page 1 of 1
tendon compliance - Millard muscle - MATLAB
Posted: Tue Jan 09, 2018 2:59 pm
by baxterj
Is it possible to query and set the TendonForceLengthCurve properties thru MATLAB? Particularly strain_at_one_norm_force using osim 3.3?
thanks - josh
Re: tendon compliance - Millard muscle - MATLAB
Posted: Tue Jan 09, 2018 3:33 pm
by adrianlai88
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
Re: tendon compliance - Millard muscle - MATLAB
Posted: Wed Jan 10, 2018 5:45 am
by baxterj
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');