Pulling columns from a table to create new table
49 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Wafa'a Shanti
el 2 de Abr. de 2018
Comentada: Wafa'a Shanti
el 4 de Abr. de 2018
Hello. I have a data table with 8 columns. I am trying to create a new table, with four of these columns, with one being time. I have
tbl=table2array(NumericValueTable(:,[1 2 4 7]))
and generate a date/time error because column 7 is a date and time. I tried to put
tbl=table2array(NumericValueTable(:,[1 2 4 datetime(7)]))
but this did not work, nor did 'datevec'. Is this possible to do?
0 comentarios
Respuesta aceptada
Peter Perkins
el 4 de Abr. de 2018
If you want to make a new table, just use subscripting, no reason to use table2array.
NumericValueTable(:,[1 2 4 7])
will return a table with only those four variables.
Más respuestas (0)
Ver también
Categorías
Más información sobre Tables en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!