MATLAB Answers

how to merge multiple timetable

조회 수: 14(최근 30일)
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.

채택된 답변

Cris LaPierre
Cris LaPierre 23 Aug 2020
You might be able to use synchronize. If you have more than 2 tables, you will need to use it multiple times.
  댓글 수: 2
Cris LaPierre
Cris LaPierre 23 Aug 2020
The OP states they are using timetables.

댓글을 달려면 로그인하십시오.

추가 답변(1개)

J. Alex Lee
J. Alex Lee 21 Aug 2020
편집: J. Alex Lee 21 Aug 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
J. Alex Lee
J. Alex Lee 22 Aug 2020
look into "innerjoin" and "outerjoin"

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by