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

7 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Adam Danz
Adam Danz el 5 de Feb. de 2020
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 comentarios
Adam Danz
Adam Danz el 5 de Feb. de 2020
Editada: Adam Danz el 5 de Feb. de 2020
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 el 6 de Feb. de 2020
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.

Iniciar sesión para comentar.

Más respuestas (1)

Steven Lord
Steven Lord el 5 de Feb. de 2020
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.

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by