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'
引用
Manu R (2024). Flatten nested cell arrays (https://www.mathworks.com/matlabcentral/fileexchange/27009-flatten-nested-cell-arrays), MATLAB Central File Exchange. に取得済み.
MATLAB リリースの互換性
作成:
R2010a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linuxカテゴリ
- MATLAB > Language Fundamentals > Matrices and Arrays >
- MATLAB > Language Fundamentals > Data Types >
Help Center および MATLAB Answers で Matrices and Arrays についてさらに検索
タグ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!