| MATLAB Function Reference | Search  Help Desk |
| dlmread | See Also |
Read an ASCII delimited file into a matrix
Syntax
M = dlmread(filename,delimiter) M = dlmread(filename,delimiter,r,c) M = dlmread(filename,delimiter,range)
Description
M = dlmread(filename,delimiter)
reads data from the ASCII delimited format filename, using the delimiter delimiter. A comma (,) is the default delimiter. Use '\t' to specify a tab delimiter.
M = dlmread(filename,delimiter,r,c)
reads data from the ASCII delimited format filename, using the delimiter delimiter, starting at file offset r and c, where r is the row offset and c is the column offset. r and c are zero based so that r=0, c=0 specifies the first value in the file, which is the upper left corner. A comma (,) is the default delimiter. Use '\t' to specify a tab delimiter.
M = dlmread(filename,delimiter,range)
imports an indexed or named range of ASCII-delimited data, using the delimiter delimiter. A comma (,) is the default delimiter. Use '\t' to specify a tab delimiter. Specify range by
range = [UpperLeftRow UpperLeftColumn LowerRightRow
LowerRightColumn]
or using spreadsheet notation, for example,
range = 'a1..b7'
Remarks
dlmread fills empty delimited fields with zero. Data files having lines that end with a non-space delimiter produce a result that has an additional last column of zeros.
See Also
dlmwrite, textread, wk1read, wk1write