Reading files in Octave

John W. Eaton jwe at octave.org
Wed Mar 11 13:14:25 CDT 2009


On 11-Mar-2009, José Luis García Pallero wrote:

| Or you can use the function load():
| 
| Cl=load('foo.dat');
| Sl = Cl(:,4);
| Cl = Cl(:,3);

Yes, if the intput file has the same number of columns on each row.
But what appeared in my mailer looked like it was 3 values on a row
followed by 1 value, and then repeating, so I used fscanf.  But maybe
that was not the actual format of the file.

jwe



More information about the Help-octave mailing list