OpenSim and Matlab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
hamed kouchebaghi
Posts: 47
Joined: Thu Nov 14, 2019 12:11 pm

OpenSim and Matlab

Post by hamed kouchebaghi » Thu Aug 13, 2020 7:01 am

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

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: OpenSim and Matlab

Post by Dimitar Stanev » Thu Aug 13, 2020 11:55 pm

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

User avatar
hamed kouchebaghi
Posts: 47
Joined: Thu Nov 14, 2019 12:11 pm

Re: OpenSim and Matlab

Post by hamed kouchebaghi » Fri Aug 14, 2020 7:51 am

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.

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: OpenSim and Matlab

Post by Dimitar Stanev » 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.

User avatar
hamed kouchebaghi
Posts: 47
Joined: Thu Nov 14, 2019 12:11 pm

Re: OpenSim and Matlab

Post by hamed kouchebaghi » Sat Aug 22, 2020 7:17 am

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

User avatar
hamed kouchebaghi
Posts: 47
Joined: Thu Nov 14, 2019 12:11 pm

Re: OpenSim and Matlab

Post by hamed kouchebaghi » Fri Aug 28, 2020 1:30 am

could anyone help me with this problem please !?

thank you

POST REPLY