How do I combine data from seperate tables into one table with seperate columns

7 ビュー (過去 30 日間)
AgonW
AgonW 2020 年 2 月 5 日
コメント済み: Adam Danz 2020 年 2 月 6 日
I am trying to combine data from several tables into 1 table. The data is 10-minute data from turbines. So every day has 144 entries. Some turbines have days missing and therefore their length is shorter. The data looks like the following
T1
Column1 Column2 Column3
Date Time Output
01/01/2014 00:10:00 68
01/01/2014 00:20:00 68
01/01/2014 00:30:00 68
: : :
: : :
: : :
01/01/2014 23:40:00 68
01/01/2014 23:50:00 68
02/01/2014 00:00:00 68
T2
Column1 Column2 Column3
Date Time Output
01/01/2014 00:10:00 68
01/01/2014 00:20:00 68
01/01/2014 00:30:00 68
: : :
: : :
: : :
01/01/2014 23:40:00 68
01/01/2014 23:50:00 68
00/01/2014 00:00:00 68
Desired

採用された回答

Adam Danz
Adam Danz 2020 年 2 月 5 日
Assuming all tables have the same number of columns with matching Variable Names, you can vertically concatenate them like this.
T = [T1; T2; T3];
  7 件のコメント
Adam Danz
Adam Danz 2020 年 2 月 5 日
編集済み: Adam Danz 2020 年 2 月 5 日
What format are those columns in? Are the dates already datetime values? Is the time column durations or are they also datetime values (or something else)? If you're unsure,
class(T.Date) % where T is your table name
class(T.Time)
Here's the datetime documentation
Adam Danz
Adam Danz 2020 年 2 月 6 日
I see that you continued the conversation here. Once that's worked out you can continue with step 2 and let us know if you get stuck.

サインインしてコメントする。

その他の回答 (1 件)

Steven Lord
Steven Lord 2020 年 2 月 5 日
Consider converting these table arrays into timetable arrays. If you do you can synchronize them all to a common time basis. See this documentation page for several examples of how to synchronize timetable arrays.

カテゴリ

Help Center および File ExchangeTables についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by