cell2mat
Convert cell array to ordinary array of the underlying data type
Syntax
A = cell2mat(C)
Description
A = cell2mat(
converts a cell array into an ordinary array. The elements of the cell array must all contain the same data type, and the resulting array is of that data type.C
)
The contents ofC
must support concatenation into an N-dimensional rectangle. Otherwise, the results are undefined. For example, the contents of cells in the same column must have the same number of columns, although they need not have the same number of rows (see figure).