Skip to content
Snippets Groups Projects
Verified Commit c8f02ddc authored by Thomas Lambert's avatar Thomas Lambert :helicopter:
Browse files

fix(sync): cleanup extrap values

parent 4873581b
No related branches found
No related tags found
No related merge requests found
......@@ -49,9 +49,11 @@ function [arduSynced, tunnelSynced, arduStartTime, tunnelStartTime] = ...
time = 0:1 / WT_SAMPLING:size(tunnelData, 1) / WT_SAMPLING;
dummy = interp1(arduShort(:, 1), arduShort(:, 2:end), time);
arduShort = [time', dummy];
nanIdx = find(isnan(arduShort(:, 2)));
arduShort(nanIdx:end, :) = []; % Remove extrapolated values
% Cut longests dataset
maxTime = max(size(arduShort, 1), size(tunnelData, 1));
maxTime = min(size(arduShort, 1), size(tunnelData, 1));
arduShort(maxTime:end, :) = [];
tunnelData(maxTime:end, :) = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment