MATLAB Function Reference    
dlmread

Read an ASCII delimited file into a matrix

Graphical Interface

As an alternative to dlmread, use the Import Wizard. To activate the Import Wizard, select Import data from the File menu.

Syntax

Description

M = dlmread(filename,delimiter) reads numeric data from the ASCII delimited file filename, using the specified delimiter. A comma (,) is the default delimiter. Use '\t' to specify a tab delimiter.

M = dlmread(filename,delimiter,R,C) reads numeric data from the ASCII delimited file filename, using the specified delimiter. The values R and C specify the row and column where the upper-left corner of the data lies in the file. 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.

M = dlmread(filename,delimiter,range) reads the range specified by
range = [R1 C1 R2 C2] where (R1,C1) is the upper-left corner of the data to be read and (R2,C2) is the lower-right corner. range can also be specified using spreadsheet notation as in range = 'A1..B7'.

Remarks

dlmread fills empty delimited fields with zero. Data files having lines that end with a non-space delimiter, such as a semi-colon, produce a result that has an additional last column of zeros.

See Also

dlmwrite, textread, csvread, csvwrite, wk1read, wk1write


  divergence dlmwrite