how to merge multiple timetable
古いコメントを表示
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.
採用された回答
その他の回答 (1 件)
J. Alex Lee
2020 年 8 月 21 日
編集済み: J. Alex Lee
2020 年 8 月 21 日
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 件のコメント
Sehoon Chang
2020 年 8 月 21 日
J. Alex Lee
2020 年 8 月 21 日
i don't understand what measurement interval (diff(timestamp)?) has to do with number of columns in the table?
when you say "Table" are you referrring to the matlab "table" data type, or are you using it generically to mean "some 1D or 2D list of things"?
you can get better answers if you are more specific, e.g., post the actual data or some approximation of it.
Sehoon Chang
2020 年 8 月 22 日
J. Alex Lee
2020 年 8 月 22 日
look into "innerjoin" and "outerjoin"
カテゴリ
ヘルプ センター および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
