Error converting between TimeSeriesTables and Matlab structs

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Rodrigo Mateus
Posts: 55
Joined: Thu Feb 22, 2018 3:07 am

Error converting between TimeSeriesTables and Matlab structs

Post by Rodrigo Mateus » Wed Dec 13, 2023 4:17 am

Hi,

I am trying to filter .mot files from C3D file, and also trying to create a new TRC file with virtual markers.

I import it using the Matlab API and try to filter the "forceStruct" in Matlab. Concerning the virtual markers, I add them to a Matlab struct and create a new TimeSeriesTableVec3 with osimTableFromStruct.m. Then, I use the TRCFileAdapter to write a new TRC with the previously created TimeSeriesTableVec3.

Unfortunately, the following error occurs:
java.lang.RuntimeException: Missing key 'DataRate'.

How can I get around this issue?

Best,
Rodrigo

Tags:

User avatar
Mohammadreza Rezaie
Posts: 378
Joined: Fri Nov 24, 2017 12:48 am

Re: Error converting between TimeSeriesTables and Matlab structs

Post by Mohammadreza Rezaie » Wed Dec 13, 2023 5:11 am

Hi, try adding the missed metadata key and value to the TimeSeriesTableVec3 using "addTableMetaDataString". Here you can find some examples:

https://github.com/opensim-org/opensim- ... #L117-L119

Hope this helps,
-Mohammadreza

POST REPLY