small fix to sorted array

This commit is contained in:
v.chau 2025-07-08 16:37:42 +02:00
parent a4dfc30f77
commit 54f86db6f7
2 changed files with 4 additions and 5 deletions

BIN
app.mlapp

Binary file not shown.

View File

@ -16,18 +16,17 @@ function [data] = vector2timetable(data_path, varargin)
end
try
data = synchronize(tt{:},"union","nearest");
% union -> union of the row times
% method -> fill gaps in output with nearest neighbor in the input timetable
catch
try
for i=1:length(tt)
data_unsorted = tt{i};
data_all{i} = sortrows(data_unsorted);
sortrows(tt{i});
end
data = synchronize(data_all{:},"union","previous");
data = synchronize(tt{:},"union","nearest");
catch
data = tt{:};
end
end
% union -> union of the row times
% method -> fill gaps in output with nearest neighbor in the input timetable
end