Effacer les filtres
Effacer les filtres

Compare/find datevector und timevector

1 vue (au cours des 30 derniers jours)
Timur
Timur le 24 Juil 2023
Commenté : Timur le 25 Juil 2023
Hello to all,
please can you show me right way. I must update one table from another. as point i have timestamp. step is 10 min.
at the first from this format i make vector with "datevec" because {'20-Jul-2023 14:10:47'} default format. then i stack
i must find vector from second table witch not loger as 10 min. but ist hard
i am on the right way or i can use samthing else and simple.
thanks a lot for your answers.

Réponse acceptée

Raheel Naveed
Raheel Naveed le 24 Juil 2023
Hi,
You mentioned using datevec, which converts date strings to date vectors. However, to perform operations based on timestamps, I recommend you convert your dates into datetime objects.
table1.timestamp = datetime(table1.timestamp,'InputFormat','dd-MMM-yyyy HH:mm:ss'); % Assuming table1 as your first table
Let's assume table1 and table2 are your two tables and they both have a variable timestamp of datetime type.
mergedTable = innerjoin(table1, table2, 'Keys', 'timestamp');
The innerjoin function merges rows from two tables based on key variables (in this case, timestamp).
Thanks
  1 commentaire
Timur
Timur le 25 Juil 2023
Thanks for your recomendation.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Time Series Objects dans Help Center et File Exchange

Tags

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by