I want to add external force to the model. How do I add the xml file that contains the force details to the model when I am using matlab?
analyzeTool.setName(name);
analyzeTool.setResultsDir(results_folder);
analyzeTool.setCoordinatesFileName([ik_results_folder motIKCoordsFile]);
analyzeTool.setInitialTime(initial_time);
analyzeTool.setFinalTime(final_time);
How can I add force to analyze tool using Matlab scripting.
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: How can I add force to analyze tool using Matlab scripting.
You will load the model (.osim) file. Then you have to add a PrescribedForce (model.addForce()) to the model. Then you provide the model to the AnalysisTool (in the constructor).
https://simtk.org/api_docs/opensim/api_ ... Force.html
Best
https://simtk.org/api_docs/opensim/api_ ... Force.html
Best