Read numeric data from the text file file which uses the delimiter sep between data values.
If sep is not defined the separator between fields is determined from the file itself.
The optional scalar arguments r0 and c0 define the starting row and column of the data to be read. These values are indexed from zero, i.e., the first data row corresponds to an index of zero.
The range parameter specifies exactly which data elements are read.
The first form of the parameter is a 4-element vector containing the upper
left and lower right corners [R0,C0,R1,C1]
where the indices are zero-based. Alternatively, a spreadsheet style
form such as "A2..Q15"
or "T1:AA5"
can be used. The
lowest alphabetical index 'A'
refers to the first column. The
lowest row index is 1.
file should be a filename or a file id given by fopen
. In the
latter case, the file is read until end of file is reached.
The "emptyvalue"
option may be used to specify the value used to
fill empty fields. The default is zero. Note that any non-numeric values,
such as text, are also replaced by the "emptyvalue"
.
See also: csvread, textscan, textread, dlmwrite.
Package: octave