I want to read a plain text file in an array of cells in matlab. How can i do this?
I do not want formatting. Reading like literals.
Thanks.
It will be an array based on strings, like 100x1
example of reading : dd = {1;2;3}
Use textscan to have one cell element per row:
textscan
fid = fopen('myFile.ext'); allData = textscan(fid,'%s','Delimiter','\n'); % allData{1} is a nLines-by-1 cell array with the lines of the file as text