[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
reading ascii data
From: |
de Almeida, Valmor F. |
Subject: |
reading ascii data |
Date: |
Tue, 05 Aug 2008 11:35:51 -0400 |
Hello,
I would like to read an ascii data file with 3 columns of integers
separated by a space, and an unknown number of rows into 3 vectors or a
matrix with 3 columns.
I have tried
[a,b,c,count] = fscanf(fid,"%i %i %i","C");
But this only reads one row of the file and I have to put it into a
while loop with an eof check. Is this a correct assessment?
Alternatively,
[val,count] = fscanf(fid,"%i %i %i");
reads the whole file as a column vector. I could break up the vector
into 3 vectors or a matrix with 3 columns but I wonder if this could be
done by the file reader function itself.
Thanks,
--
Valmor
- reading ascii data,
de Almeida, Valmor F. <=