Why does synchronize omit and duplicate rows from component timetables?
2 次查看(过去 30 天)
显示 更早的评论
When I synchronize two timetables, the result omits or duplicates rows from the component timetables, depending on options. The attached timetables.mat file contains two timetables, tt and TT, that reproduce the problem. Both TT and tt have a sample rate of 5e6, and were built using array2timetable, where I specified the vector of values, the sample rate (5e6), and a start time.
load('timetables.mat', 'TT', 'tt')
missing_rows = synchronize(TT, tt, 'regular', 'fillwithmissing', 'SampleRate', 5e6);
duplicate_rows = synchronize(TT, tt);
In missing_rows, variable 4 ("tt"), rows 14588-14594 are filled with NaNs, but data exist at these times, as seen in timetable tt rows 488-494. These kinds of omissions can be seen in many other places if you run stackedplot(missing_rows).
In duplicate_rows, look at rows 14105-14119 variable 4 ("tt"). TT and tt share times, but in these rows of duplicate_rows, each time is listed twice with NaNs interspersed. Again, this occurs in many places.
Is there a way to synchronize these tables without the missing or duplicate row problems?
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!