Using MatLab to batch process

Hi - I am processing multiple trials one after another, which (unless I’m being really silly) loading up multiple ‘main’ files, running individual analysis scripts (load parameters then marker tracking), then starting all over again with the next trial. I have 15 subjects, and each has 10 individual gait cycle trials needed analysing. So I was wondering if I could use Matlab to automate this process? Many thanks

Hi Samuel,

There is definitely a way to automate the process! There is normally a way to call the console application from Matlab. I am not completely sure, but the command should be something like this:

anybodycon -m

Then, you should specify a path to a macro file. This can be a little bit cumbersome since you will have to manually write Macro files. You can probably wrap this command in a for loop to batch process. There is a tutorial on using the console application. You can probably find some more information if you search in the forum. With MATLAB, we unfortunately don't have any documentation on how to call AnyBody.

Do you have access to Python? If yes, then we have the AnyPyTools library for doing these things from Python. The library has tools that can easily generate the macro files, run the models and extract outputs for post processing. I would highly recommend you try out AnyPyTools, where you can find some documentation and examples to help you get going.

You can also look at our ADL Gait example, where you can find a Python script to batch process the all the trials.

I hope that helps.

Best regards,
Dave