Concatenation of nested cell in one array and writing in text file
조회 수: 11(최근 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)
댓글 수: 2
추가 답변(0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!