I am dynamically storing data from different data recorders in timetables, nested in a structure DATA
, such as DATA.Motor
(timetable with motor data), DATA.Actuators
(timetable with actuators data) and so on.
My objective is to have a function that synchronizes and merges these timetables so I can work with one big timetable.
I am trying to use synchronize
to merge and synchronize those timetables:
fields = fieldnames(DATA);
TT = synchronize(DATA.(fields{1:end}));
but get the following error:
Expected one output from a curly brace or dot indexing expression, but there were 3 results.
This confuses me because DATA.(fields{1})
return the timetable of the first field name of the DATA
structure.
Any thought on how I can solve this is greatly appreciated.