better fix
This commit is contained in:
		@ -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
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user