From d3b8a9ac419057aa7ffcdc257c839f4d7e497668 Mon Sep 17 00:00:00 2001 From: "v.chau" Date: Mon, 30 Jun 2025 18:12:50 +0200 Subject: [PATCH] better fix --- assets/vector2timetable.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/assets/vector2timetable.m b/assets/vector2timetable.m index 80b17bb..4283cce 100644 --- a/assets/vector2timetable.m +++ b/assets/vector2timetable.m @@ -17,7 +17,15 @@ function [data] = vector2timetable(data_path, varargin) try data = synchronize(tt{:},"union","nearest"); catch - data = tt{:}; + try + for i=1:length(tt) + data_unsorted = tt{i}; + data_all{i} = sortrows(data_unsorted); + end + data = synchronize(data_all{:},"union","previous"); + catch + data = tt{:}; + end end % union -> union of the row times % method -> fill gaps in output with nearest neighbor in the input timetable