Extracting corresponding timestamp in two tables of different sizes.
Ältere Kommentare anzeigen
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 Kommentare
Stephen23
am 26 Mai 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
am 26 Mai 2023
Star Strider
am 26 Mai 2023
DD_2023
am 30 Mai 2023
Mathieu NOE
am 1 Jun. 2023
maybe sharing some data would help
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!