Function to use withtol but only forward in time?
1 view (last 30 days)
Show older comments
Louise Wilson on 2 Mar 2021
I have a timetable where the rows are datetimes. I then have a second timetable and I want to match the values in the second timetable to the first, but only where the times match within a certain time range. I want to include only those rows from the second timetable which occur within 2 minutes of the datetimes in the first. I can do this using withtol, but then I get + and - 2 minutes. How do I set the tolerance to only include 2 minutes after?
%we get a value for boat counts if photo was captured 2 minutes either side
%of hydrophone recording
%select the times in boat_counts that match detections times with tolerance
%extract rows in boat_counts that are within 2 min of hydrophone recordings
%change detections datetimes to closest datetime of images
%(specific datetime of hydrophone recording remains in spectrogram filename
%of each row)
%use synchronize to join the matched rows
Find more on Timetables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!