How to plot only the matches of two different datetime?

1 visualización (últimos 30 días)
jeon
jeon el 31 de Jul. de 2021
Respondida: Peter Perkins el 2 de Ag. de 2021
I have two datas that have different dimensions of datetime.
Datetime A has value of a, and datetime B which is shorter has b.
Is it possible to plot values a when datetime A and B matches? If so, can I know what to do?

Respuesta aceptada

dpb
dpb el 31 de Jul. de 2021
Convert A and B to timetables, then use innerjoin
ttC=innerjoin(ttA,ttB);
will leave timetable ttC with the times that are unique to both tables.

Más respuestas (1)

Peter Perkins
Peter Perkins el 2 de Ag. de 2021
If all you have are two datetime vectors, you can use intersect to find the common values. But I'm guessing you have other data as well, so dpb's suggestion is likely the right one.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by