Hello
Is it possible to change .MOT file of default model while adding external force? ( I want to change .mot file of gait2392 while adding external force by Matlab and see the results of changing muscle forces)
also, I don't have any experimental data to create new .MOT file
change mot file while adding external force
- saeed aram
- Posts: 20
- Joined: Mon Oct 09, 2017 2:26 pm
Re: change mot file while adding external force
Hi-
You can edit the .mot file in a text editor and in Matlab. What editing are you trying to perform? It isn't clear from your description of what you are trying to do and with what files.
-J
You can edit the .mot file in a text editor and in Matlab. What editing are you trying to perform? It isn't clear from your description of what you are trying to do and with what files.
-J
- saeed aram
- Posts: 20
- Joined: Mon Oct 09, 2017 2:26 pm
Re: change mot file while adding external force
Thanks for your response
I know that i can edit .mot file in a text editor and in matlab but my main question is that i want to change angular displacement and GRF of motion manually due to i have not enough facilities to get experimental data. after edit .mot file i want to add external force to model by matlab and then load .mot file on model and plot tendon forces to time to take results.
my question is very important to continue my research so I am waiting to your exact response.
best regards
Re: change mot file while adding external force
If you want to make your own data, you will have to use something like Matlab or Excel to define the motion and force curves. Once you have the curves, you could edit the .mot file in Excel-- copying and pasting the data into the correct columns-- or in Matlab to generate a OpenSim TimesSeriesTable and write the data to file using the STOFileAdapter().
Once you have the force file, I would suggest using the InverseDynamicsTool(), and the ExternalLoads() classes to perform the dynamics analysis you need. There is some example code of the Inverse Dynamics pipeline written in Jython here that can be converted to Matlab very easily. You would just then need to add code that altered the External Loads file.
Once you have the force file, I would suggest using the InverseDynamicsTool(), and the ExternalLoads() classes to perform the dynamics analysis you need. There is some example code of the Inverse Dynamics pipeline written in Jython here that can be converted to Matlab very easily. You would just then need to add code that altered the External Loads file.
- saeed aram
- Posts: 20
- Joined: Mon Oct 09, 2017 2:26 pm
Re: change mot file while adding external force
thank you very much for your exact responsejimmy wrote: ↑Wed Jun 05, 2019 5:20 pmIf you want to make your own data, you will have to use something like Matlab or Excel to define the motion and force curves. Once you have the curves, you could edit the .mot file in Excel-- copying and pasting the data into the correct columns-- or in Matlab to generate a OpenSim TimesSeriesTable and write the data to file using the STOFileAdapter().
Once you have the force file, I would suggest using the InverseDynamicsTool(), and the ExternalLoads() classes to perform the dynamics analysis you need. There is some example code of the Inverse Dynamics pipeline written in Jython here that can be converted to Matlab very easily. You would just then need to add code that altered the External Loads file.
that was really useful