Update prescribed force
Posted: Tue Apr 16, 2019 5:48 am
Hello, if anyone could help me with this topic.
I am able to create this force (at the model), but I do not know how I change it in Matlab, during forward simulation
How can I get this pelvis_Force and change its ForceFunction during simulation?
I am able to create this force (at the model), but I do not know how I change it in Matlab, during forward simulation
Code: Select all
% Create force
pelvis_Force = PrescribedForce(pelvis);
pelvis_Force.setName('pelvis_force');
pelvis_Force.setForceFunctions(Constant(0), Constant(250), Constant(0));
% Add the force to the model
osimModel.addForce(pelvis_Force); % Add the force to the model