table2array
Convert table to homogeneous array
Syntax
Description
A = table2array(
converts the table or timetable,
T
)T
, to a homogeneous array, A
. The
variables in T
become columns in A
.
The output A
does not include the table properties in
T.Properties
.
If
T
is a table with row names, thenA
does not include the row names.If
T
is a timetable, thenA
does not include the row times.
Examples
Input Arguments
Tips
table2array
horizontally concatenates the variables inT
to createA
. If the variables inT
are cell arrays,table2array
does not concatenate their contents, andA
is a cell array, equivalent totable2cell(T)
. To create an array containing the contents of variables that are all cell arrays, usecell2mat(table2cell(T))
.table2array(T)
is equivalent toT{:,:}
.
Algorithms
If T
contains variables with different data
types that are compatible for horizontal concatenation, table2array
creates
a homogeneous array, A
, of the dominant data type.
For example, if T
contains double
and single
numeric
data, table2array(T)
returns an array with data
type single
.
Extended Capabilities
Version History
Introduced in R2013b