Hello there!
I was trying to get into the issue of converting a c3d file to be used in opensim. Since it is the first time I do this step ( in my works with opensim I received the .mot files), I used the matlab scripts from the project from felipe alvim (https://simtk.org/projects/c3d2opensim). To get confortable with the code, I used the SLTHT in the same project, however, I can not get rid of this error in Matlab:
Undefined function 'adapta_nomes_coordgen' for input arguments of type 'cell'.
Error in c3d2OS (line 151)
lista_nomes_coordgen2 = adapta_nomes_coordgen (lista_nomes_coordgen1);
How do I get around this?
Best regards,
Rodrigo Mateus
Converting c3d to mot
- Rodrigo Mateus
- Posts: 57
- Joined: Thu Feb 22, 2018 3:07 am
Re: Converting c3d to mot
The project you linked seems to be pretty old and I wouldn't expect the functions to still work with OpenSim 4.0.
You could try to use the in-built methods of 4.0 with the included Matlab classes to perform the transform. Documentation for setting your Matlab environment is here and documentation for the C3D adapter is here.
I think I read somewhere that you are using Matlab 2014-- just be aware that OpenSim 4.0 is 64-bit and that must match your Matlab version (Matlab must be 64- it version)
You could try to use the in-built methods of 4.0 with the included Matlab classes to perform the transform. Documentation for setting your Matlab environment is here and documentation for the C3D adapter is here.
I think I read somewhere that you are using Matlab 2014-- just be aware that OpenSim 4.0 is 64-bit and that must match your Matlab version (Matlab must be 64- it version)
- saylee patkar
- Posts: 35
- Joined: Wed Jun 20, 2018 1:03 am
Re: Converting c3d to mot
Dear sir,jimmy wrote: ↑Fri Feb 08, 2019 11:01 amThe project you linked seems to be pretty old and I wouldn't expect the functions to still work with OpenSim 4.0.
You could try to use the in-built methods of 4.0 with the included Matlab classes to perform the transform. Documentation for setting your Matlab environment is here and documentation for the C3D adapter is here.
I think I read somewhere that you are using Matlab 2014-- just be aware that OpenSim 4.0 is 64-bit and that must match your Matlab version (Matlab must be 64- it version)
I have configured MATLAB with Opensim successfully. Also I have extracted some c3d files using example script "c3dExport.m". But some c3d files I could not convert to trc and mot due to some error as follows.
1. Illegal Column label.*119 changed to _119
Invalid field name :'_119'.
(this is error from utility osimTableToStruct(Line 94))
2. Java exception occurred:
I have added pictures of errors since I am working on different computer and on that I am not allowed any connectivity access.
- Attachments
-
- Error.docx
- (117.57 KiB) Downloaded 22 times
Re: Converting c3d to mot
The error is related to some renaming issues found here. Unnamed markers in the C3D are given the name "*N" where N is a number. The Matlab function tries to rename that too "_N", but underscores are illegal at the beginnning of the Matlab Struct members.
You could fix this in one of two ways; (i) delete all the unnamed markers in your C3D, or (ii) edit the local version of the Matlab Script to change '*' characters to something like 'm' ( "*119" -> "m119").
A fix will be included in the next OpenSim update, but that may be awhile.
You could fix this in one of two ways; (i) delete all the unnamed markers in your C3D, or (ii) edit the local version of the Matlab Script to change '*' characters to something like 'm' ( "*119" -> "m119").
A fix will be included in the next OpenSim update, but that may be awhile.
- saylee patkar
- Posts: 35
- Joined: Wed Jun 20, 2018 1:03 am