import .sto file in matlab
- raman samberia
- Posts: 28
- Joined: Tue Jan 03, 2017 11:29 pm
import .sto file in matlab
cant import states.sto from cmc result into matlab
Re: import .sto file in matlab
You can try and use some of the functions in this package;
https://simtk.org/projects/opensim-utils
There are other packages that could have the scripts your looking for here;
https://simtk-confluence.stanford.edu/d ... otion+Data
...and you can also try writing your own reader in Matlab
https://simtk.org/projects/opensim-utils
There are other packages that could have the scripts your looking for here;
https://simtk-confluence.stanford.edu/d ... otion+Data
...and you can also try writing your own reader in Matlab
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: import .sto file in matlab
If you just want the data, you can use something like
or MATLAB's "Import Wizard" (type "uiimport" in the MATLAB Command Window). There are several other approaches depending on what you're trying to do with the data, including using OpenSim's Storage class (if you're using 3.3) or STOFileAdapter class (if you're using 4.0).
Code: Select all
states = dlmread('arm26_states.sto', '\t', 7,0);
- Josh Baxter
- Posts: 29
- Joined: Fri Mar 11, 2016 12:29 pm
Re: import .sto file in matlab
.mot and .sto files are pretty similar (with some small differences in the header info - the first 5 rows are the same and it ends with 'endheader' before the variable names and data). attached is a matlab function that reads both file formats and builds a structure.
*edit* i'm not able to attach the script to this post - feel free to PM
*edit* i'm not able to attach the script to this post - feel free to PM