How do I save a cell array as txt file?
Mostrar comentarios más antiguos
I have a 1x34 cell array containing 34 file names and paths e.g., "C:\Users\Jack\Documents\MATLAB\Sample_Data\Raw\NSX100.NC5". I simply want a txt file containing this info, one path per line, in order to process them in batches at a later date.
Respuestas (1)
Star Strider
el 25 de Mzo. de 2018
One approach is just to use fprintf:
AC = {'abd', 'defg', 'hijklm', 'nop'};
fid = 1;
fprintf(fid, '%s\n', AC{:})
producing:
abd
defg
hijklm
nop
Categorías
Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!