Hi,
I have created a simulation model in Opensim 4.0 through Notepad++
But, i would like create a MATLAB/python program for the same simulation. I was able to install the opensim package in both MATLAB and python.
Could anyone let me know if there is a way to export the .osim file into matlab to create .m matlab file or do i have write a separate matlab code for the same simulation to do it?
One more thing, the reason i wanted to create a MATLAB code for the simulation is that I have been using a constant value to specify the 'location in parent' value for the body but instead i would like to use a variable to specify it.
For instance:
I am currently using the following
<location_in_parent>0 0.8 0</location_in_parent>
But i would like to use a variable like the following
<location_in_parent>0 t 0</location_in_parent>
where i can change the value the variable 't' whenever i want.
If this can be done, Please let me know about that as well.
Thank you.
Exporting a opensim model to MATLAB
- Yokhesh KrishnasamyTamilselvam
- Posts: 9
- Joined: Fri Jan 25, 2019 9:53 am
Re: Exporting a opensim model to MATLAB
You will need to write your own script that reads your model into memory, makes edits, and runs a simulation. There are example scripts in your OpenSim Resources/Code/Matlab directory. An example of editing a models muscle strength can be seen here