array2table
Convert homogeneous array to table
Description
converts an
T
= array2table(A
)m
-by-n
array to an
m
-by-n
table. Each column of input
A
becomes a variable in output T
.
array2table
uses the input array name appended with the column number for
the variable names in the table. If these names are not valid MATLAB® identifiers, array2table
uses names of the form
'Var1',...,'Var
, where
N
'N
is the number of columns in
A
.
creates
a table from an array, T
= array2table(A
,Name,Value
)A
, with additional options
specified by one or more Name,Value
pair arguments.
For example, you can specify row names or variable names to include in the table.
Examples
Input Arguments
Output Arguments
Tips
If
A
is a cell array, usecell2table(A)
to create a table from the contents of the cells inA
. Each variable in the table is numeric or a cell array of character vectors.array2table(A)
creates a table where each variable is a column of cells.