mat2cell
Split an array into a cell array.
📝Syntax
C = mat2cell(A, rowSizes)
C = mat2cell(A, rowSizes, colSizes, ...)
📥Input Arguments
Parameter Description
A Input array.
rowSizes Block sizes for the first dimension.
📤Output Arguments
Parameter Description
C Cell array containing blocks of A.
📄Description

mat2cell splits A into cells whose sizes are given for each dimension.

💡Examples
C = mat2cell(reshape(1:12, [3 4]), [1 2], [3 1])
🔗See Also
num2cellcell2mat
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub