Concatenation of nested cell in one array and writing in text file
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Jan
am 26 Apr. 2021
Data = load('nestedCell.mat');
C = cat(2, Data.nestedCell{:});
FID = fopen('YourFile.txt', 'w');
fprintf(FID, '%-8s%g\n', C{:});
fclose(FID)
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Cell Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!