Extracting corresponding timestamp in two tables of different sizes.
Show older comments
I have two versions of one dataset. A final processed version that includes timestamps with hours and minutes (the seconds got lost early in the processing), and a raw version that retains the original datestamp with seconds. I would like to be able to extract the timestamp with seconds, and match it to the final data.
I currently have the data as two tables and have tried to extract the locations based on where variables that appear in both tables match (using ismember), but it doesn't seem to be finding the right timestamps.
x = ismember(old.Var1, new.Var1) & ismember(old.Var2, new.Var2) & ismember(old.Var3, new.Var3);
y = old.Timestamp(x);
Ay advice would be appreciated!
5 Comments
Stephen23
on 26 May 2023
If you are hoping to match based on similar times then you might need RETIME or DATESHIFT or similar.
Followed by a JOIN or similar.
DD_2023
on 26 May 2023
Star Strider
on 26 May 2023
DD_2023
on 30 May 2023
Mathieu NOE
on 1 Jun 2023
maybe sharing some data would help
Accepted Answer
More Answers (0)
Categories
Find more on Time Series Events 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!