Concatenation of nested cell in one array and writing in text file
1 回表示 (過去 30 日間)
古いコメントを表示
How do I rearrange a 8x1 nested cell into one long cell array (variable attached). Each (from 8) cell includes 2x1 cell. My goal is twofold:
- saving the of the 8x1 nested cell in a cell array
- writing the unnested cell array to a text file
Thanks!
0 件のコメント
採用された回答
Jan
2021 年 4 月 26 日
Data = load('nestedCell.mat');
C = cat(2, Data.nestedCell{:});
FID = fopen('YourFile.txt', 'w');
fprintf(FID, '%-8s%g\n', C{:});
fclose(FID)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!