Extracting corresponding timestamp in two tables of different sizes.
Mostrar comentarios más antiguos
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 comentarios
Stephen23
el 26 de Mayo de 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
el 26 de Mayo de 2023
Star Strider
el 26 de Mayo de 2023
DD_2023
el 30 de Mayo de 2023
Mathieu NOE
el 1 de Jun. de 2023
maybe sharing some data would help
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Time Series Events en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!