set external force in matlab and opensim compute new state
- Maryam khamar
- Posts: 4
- Joined: Wed Nov 18, 2015 4:52 am
set external force in matlab and opensim compute new state
I want to set external force in matlab and opensim compute force and new state after this force. I compile c++ code and define a mex file. But I don’t know how define external force in opensim. I want to use external force class in opensim but it’s get information from storage file. How I can set external force in matlab and define as input in opensim "compute force" function
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: set external force in matlab and opensim compute new state
Maybe you are interested in PrescribedForce:
https://simtk.org/api_docs/opensim/api_ ... Force.html
Best
https://simtk.org/api_docs/opensim/api_ ... Force.html
Best
- Maryam khamar
- Posts: 4
- Joined: Wed Nov 18, 2015 4:52 am
Re: set external force in matlab and opensim compute new state
Yes, do you say use these function of prescribedforce:
SetTorqueFunction
SetPointFunctions
I define a header file that define this class and this function and then define a source file that define function and define mex file?
After define mex file and compile it, in matlab use the function SetTorqueFunction and SetPointFunction?
SetTorqueFunction
SetPointFunctions
I define a header file that define this class and this function and then define a source file that define function and define mex file?
After define mex file and compile it, in matlab use the function SetTorqueFunction and SetPointFunction?