Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



reading text file line by line
Posted:
Aug 3, 2012 3:03 PM


Hello,
I have a big text file called data.txt. Would like to read this to Matlab. I am trying to do this with the following code==>
KK=fopen('F:\commands\data.txt'); A=fscanf(KK,'%s');
This reads the whole content of data.txt to A without any line breaks or spaces. How to make it read line by line and keeping the spaces as in data.txt?
Thanks Leyo



