Page 1 of 1

Error converting between TimeSeriesTables and Matlab structs

Posted: Wed Dec 13, 2023 4:17 am
by rodmateus
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

Re: Error converting between TimeSeriesTables and Matlab structs

Posted: Wed Dec 13, 2023 5:11 am
by kernalnet
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