tendon compliance - Millard muscle - MATLAB

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Josh Baxter
Posts: 29
Joined: Fri Mar 11, 2016 12:29 pm

tendon compliance - Millard muscle - MATLAB

Post by Josh Baxter » Tue Jan 09, 2018 2:59 pm

Is it possible to query and set the TendonForceLengthCurve properties thru MATLAB? Particularly strain_at_one_norm_force using osim 3.3?

thanks - josh

User avatar
Adrian Lai
Posts: 46
Joined: Tue Mar 13, 2012 11:33 am

Re: tendon compliance - Millard muscle - MATLAB

Post by Adrian Lai » Tue Jan 09, 2018 3:33 pm

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

User avatar
Josh Baxter
Posts: 29
Joined: Fri Mar 11, 2016 12:29 pm

Re: tendon compliance - Millard muscle - MATLAB

Post by Josh Baxter » Wed Jan 10, 2018 5:45 am

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');

POST REPLY