How can I add a line return to an uploaded text file?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
I've uploaded a large .txt file containing the directories of all files of a desired file type. In the .txt file, every directory is on its own line. Once uploaded to Matlab however, the line returns are missing and I am left with a matrix of 1x2621385 char.
4 Comments
Star Strider
on 8 Jul 2014
What function are you using to read it into your MATLAB workspace?
Posting the code you use would be helpful.
Zeke Merchant
on 8 Jul 2014
Edited: Zeke Merchant
on 8 Jul 2014
Sara
on 8 Jul 2014
Try:
inventory= textscan(fileID,'%s %*[^\n]');
inventory = inventory{1};
Zeke Merchant
on 8 Jul 2014
Answers (0)
This question is closed.
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!