about AnyOutputFile


I want to use AnyOutputFile to output data (.txt) and paste in excel.

In the output file, the first line should be time, 2n,3rd… line should be forces or other outputs.

t1 Fa1 Fb1 Fc1
t2 Fa2 Fb2 Fc2
t3 …

It works well for joint forces, but not for the predefined data in the c3d file.

If I tried to output the some data such as hip angles and ground reaction force from c3d files, these data are aligned in a different way as joint forces. I cannot simply copy and paste these data in excel along with time. I know this is because that these data are not generated through time step.

So, if I want to output the data from c3d files and put these data in the same output file and in the same alignment as joint forces in order to paste easily in excel, how can I do?
The output file should be like this (the red ones are from c3d files):

t1 Fa1 Fb1 Fc1 Gf1
t2 Fa2 Fb2 Fc2 Gf2
t3 …

Many thanks.


Hi Jerry,

Even I have not tried yet, but I have an idea for your question.

In the GaitFullBody example, there is ‘ForcePlateType4AutoDetection.any’ file.

And in the file, you can see the following code:

AnyFunInterpol load ={
    //  Data=.Cal'*{.LowPassFilter(Fx),.LowPassFilter(Fy),.LowPassFilter(Fz),.LowPassFilter(Mx),.LowPassFilter(My),.LowPassFilter(Mz)};
  AnyVar FzTotal=load(ForcePlateDriver.t)[2];
  AnyVar OnOff=iffun(gtfun(-FzTotal,10.0),1.0,0.0);

Like this, you can define an AnyFunInterpol function using the data from C3D file. And you can use your AnyFunInterpol function in AnyOutputFile.

I hope this may help to you.

Best regards,


Many thanks.

I know how to export ground reaction force now. But I still cannot export the kinematic data (hip angles) from the c3d files, like the way I want to export the ground reaction force.

Besides the way Morten suggested here: http://forum.anyscript.org/showthread.php?p=14231#post14231 , is there any other way I can export hip angles from the c3d files?

I think simply reading the joint kinematic information and exporting these data is the easiest way for me. Is it possible to let GaitLowerExtremity read the kinematic data in c3d files but the model actually does not used these data, only to export these data?


Hi Jerry,

I can see that Morten gave you a ggod answer in the other thread. I think you should just use the last solutuion he suggested, that will do exactly what you are asking for.

Best regards, Sylvain.