Page 1 of 1

OpenSim and Matlab

Posted: Thu Aug 13, 2020 7:01 am
by hamed1994
hello,

how can I load motion file in MATLAB after creating the model in MATLAB environment ? (I have loaded Arm26 model in MATLAB and now I wanna start moving the model)

thank you,

Hamed

Re: OpenSim and Matlab

Posted: Thu Aug 13, 2020 11:55 pm
by mitkof6
Hi Hamed,

The best place to look is in the opensim-core repository examples and to familiarize with the API:

https://github.com/opensim-org/opensim- ... nInModel.m
https://github.com/opensim-org/opensim- ... _Tutorials
https://github.com/opensim-org/opensim- ... ava/Matlab

Re: OpenSim and Matlab

Posted: Fri Aug 14, 2020 7:51 am
by hamed1994
thanks for the reply,

I checked the links you sent me but that wasn't so helpful.
I wanna know whether I have to write a code for loading a motion or I can load the ".m" file directly in MATLAB.
I'm a bit confused.

Re: OpenSim and Matlab

Posted: Tue Aug 18, 2020 12:27 am
by mitkof6
There are different options:

You can read a .mot, .sto file with the Storage facility:

https://github.com/opensim-org/opensim- ... on.py#L140

or you can use DataTable:

https://simtk.org/api_docs/opensim/api_ ... ca73b9a1aa

Again, the best way to see how to use these are by looking at the example files or the doxygen API.

Re: OpenSim and Matlab

Posted: Sat Aug 22, 2020 7:17 am
by hamed1994
mitkof6 wrote:
Tue Aug 18, 2020 12:27 am
There are different options:

You can read a .mot, .sto file with the Storage facility:

https://github.com/opensim-org/opensim- ... on.py#L140

or you can use DataTable:

https://simtk.org/api_docs/opensim/api_ ... ca73b9a1aa

Again, the best way to see how to use these are by looking at the example files or the doxygen API.
I still didn't understand the way I should try. could you give me an example how can do that ?

thank you,
Hamed

Re: OpenSim and Matlab

Posted: Fri Aug 28, 2020 1:30 am
by hamed1994
could anyone help me with this problem please !?

thank you