how to merge multiple timetable
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Sehoon Chang
il 21 Ago 2020
Commentato: Cris LaPierre
il 23 Ago 2020
dear advisers,
i have multiple timetables with different timestamps (yyyy-mm-dd hh:mm), but within a same time period.
I wish to merge multiple timetables into a single timetable, and the measurement recorded for each corresponding timestamps shall be organized in ascending order (e.g. 2020-08-01 0:00 , 2008-08-01 1:00, ....).
Thank you for your advice.
0 Commenti
Risposta accettata
Cris LaPierre
il 23 Ago 2020
You might be able to use synchronize. If you have more than 2 tables, you will need to use it multiple times.
2 Commenti
J. Alex Lee
il 23 Ago 2020
Just a quick note this would probably require conversion of your tables into timetables first with table2timetable().
Also based on quick read of the docs, doesn't appear to have an option to behave more like a join, i.e., do not fill missing? Anyway I suppose it ultimately depends on exactly what the end objective is.
Più risposte (1)
J. Alex Lee
il 21 Ago 2020
Modificato: J. Alex Lee
il 21 Ago 2020
If the tables have the same columns, you should be able to simply vertically concatenate them and sort
t0 = sortrows(vertcat(t1,t2,t3))
4 Commenti
Vedere anche
Categorie
Scopri di più su Tables in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!