Skip to content

cell2table

Convert a cell array to a table.

T = cell2table(C)
T = cell2table(C, 'VariableNames', {'name1', ...})

Each column of cell array C becomes one column variable in the resulting table. Useful for parsing tabular data that arrived as a cell of mixed-type values.

cell2table({1, 'a'; 2, 'b'}, 'VariableNames', {'id', 'label'})
  • table — Create a table — a heterogeneous tabular data container.
  • cell2mat — Convert a cell array to a matrix.
  • array2table — Convert a matrix to a table.