Page 1 of 1

Headers in Matlab generated motion file not working

Posted: Fri Jul 12, 2013 3:14 pm
by drew208
Hello all

I generated motion files in matlab and everything seems right visually in excel but when I load in the motionfiles in opensim they load but do not interpret my header file properly. Ayman can you take a look at this

Re: Headers in Matlab generated motion file not working

Posted: Fri Jul 19, 2013 1:49 pm
by andrewlapre
Try adding a second heading for each of the coordinates only with _u after with data under the heading equal to 0. I had this problem as well.

For example:
time humerus_tx humerus_ty humerus_tz
1 -0.862531 0.00938937 0.0359995
2 -0.862551 0.00997571 0.0357119
3 -0.862575 0.0117628 0.0345251
becomes:
time humerus_tx humerus_ty humerus_tz humerus_tx_u humerus_ty_u humerus_tz_u
1 -0.862531 0.00938937 0.0359995 0 0 0
2 -0.862551 0.00997571 0.0357119 0 0 0
3 -0.862575 0.0117628 0.0345251 0 0 0
Also, check to make sure nColumns in the header agrees with how many you actually have.

Hope this helps,
Andy

Re: Headers in Matlab generated motion file not working

Posted: Fri Jul 19, 2013 2:27 pm
by aymanh
Hi,

The issue with the header is that the key words are case sensitive:
Change:
Version -> version
indegrees -> inDegrees

and it should work.

Best regards,
-Ayman