I want to read a regular text file into cell array at the matlab. How can i do that ?
I don't want any formatting. Reading as literals.
Thank you.
It will be row based array like 100x1
example of reading : dd = {1;2;3}
Use textscan
, so to have one cell element per line:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With