'summary' function for a cell

3 views (last 30 days)
alpedhuez on 19 Dec 2020
Commented: Walter Roberson on 23 Dec 2020
summary function provides a summary of a content of a table
Then what is a function to summarize the information of a cell?

Accepted Answer

madhan ravi
madhan ravi on 19 Dec 2020
help cell2table
CELL2TABLE Convert cell array to table. T = CELL2TABLE(C) converts the M-by-N cell array C to an M-by-N table T. CELL2TABLE vertically concatenates the contents of the cells in each column of C to create each variable in T, with one exception: if a column of C contains character vectors, then the corresponding variable in T is a cell array of character vectors. T = CELL2TABLE(C, 'PARAM1', VAL1, 'PARAM2', VAL2, ...) specifies optional parameter name/value pairs that determine how the data in C are converted. 'VariableNames' A string array or cell array of character vectors containing variable names for T. The names must be valid MATLAB identifiers, and must be unique. 'RowNames' A string array or cell array of character vectors containing row names for T. The names need not be valid MATLAB identifiers, but must be unique. See also TABLE2CELL, ARRAY2TABLE, STRUCT2TABLE, TABLE. Documentation for cell2table doc cell2table
Walter Roberson
Walter Roberson on 23 Dec 2020
You only initialize v1(1) so you have a problem when i = 3 because then you need v1(3-1) -> v1(2)

Sign in to comment.

More Answers (0)


Find more on Cell Arrays in Help Center and File Exchange


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!