array2table
Convert an array to a table.
tbl = array2table (A)
converts the 2-D matrix A to
the table tbl, where each column of A becomes a variable in
tbl.
A can be any type of array supported by table
, including a cell
array, as long they are constraint to 2 dimensions. However, in the case of
a cell array array2table
does not extract the contents of its cells,
resulting to a table with each variable being a column of cells. Use
cell2table
if you wat to create a table from the contents of the cells
in A.
tbl = array2table (A, Name, Value)
specifies
optional parameters for creating the table tbl with the following
Name-Value paired arguments.
Name | Value | |
---|---|---|
'VariableNames' | A cell array of character vectors or a string array defining the variable names of tbl. The names must be valid variable names and unique. | |
'RowNames' | A cell array of character vectors or a string array defining the row names of tbl. The names must be unique but not necessarily valid variable names. | |
'DimensionNames' | A cell array of character vectors or
a string array defining the dimension names of tbl. The names must be
unique and not in conflict with variable names. By default, dimension names
are 'Row', 'Variables' . |
See also: cell2table, struct2table, table
Source Code: array2table