Concatenation of nested cell in one array and writing in text file
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Jan
il 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Cell Arrays in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!