Flatten nested cell arrays
Versione 1.0.0.1 (1,29 KB) da
Manu R
Linearize a cell array tree structure
C1 = flatten({{1 {2 3}} {4 5} 6})
C2 = flatten({{'a' {'b','c'}} {'d' 'e'} 'f'})
% Outputs:
C1 =
[1] [2] [3] [4] [5] [6]
C2 =
'a' 'b' 'c' 'd' 'e' 'f'
Cita come
Manu R (2025). Flatten nested cell arrays (https://it.mathworks.com/matlabcentral/fileexchange/27009-flatten-nested-cell-arrays), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2010a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- MATLAB > Language Fundamentals > Matrices and Arrays >
- MATLAB > Language Fundamentals > Data Types >
Scopri di più su Matrices and Arrays in Help Center e MATLAB Answers
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
