[out] = CELLFLAT(celllist) searches every cell element in cellist and put them on the top most level. Therefore, CELLFLAT linearizes a cell array tree structure.
1. The default behavior does not change.
2. Additional parameter for flatten cell arrays up to N level
cellflat(C,N) flatten cell array C for up to N level (N level search/flatten). The default value is N = -1.
3. Compatible to all Matlan versions.
Yung-Yeh Chang (2022). Flatten (Nested) Cell Arrays (https://www.mathworks.com/matlabcentral/fileexchange/50502-flatten-nested-cell-arrays), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!