write from cell aray to txt file
Show older comments
I have a cell array like this:

I want to write it line by line into a txt file (so I can chose which line to write whith an if), I also have to put a whitespace between every cell like this:

the number of whitespaces beetween each cell doesn' t make any difference, I can' t figure out how to write it (the cell array is pretty large so an optimized solution would be handy)
thank you for the support in advance
2 Comments
Rik
on 8 May 2022
You have a cell array of char arrays, so the obvious way to write that is with a loop. Are you able to write text to a file?
Andrea Somma
on 8 May 2022
Edited: Andrea Somma
on 8 May 2022
Accepted Answer
More Answers (0)
Categories
Find more on Cell Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!