FUNCTION REFERENCE
dlmread
Read a numeric file with delimiters.
Read a numeric file with delimiters.
Syntax
M = dlmread(filename)Syntax
M = dlmread(filename, delimiter)Syntax
M = dlmread(filename, delimiter, r, c)Syntax
M = dlmread(filename, delimiter, [r1 c1 r2 c2])The delimiter is found from the first line when omitted (comma, tab, semicolon,
or spaces). r and c count rows and columns to skip, starting from 0. Empty
fields and missing values at the end of a row read as 0; fields outside the requested range are skipped before parsing. Retained non-numeric fields
raise a mismatch error with the row and field number. A row offset at or past
the end of the data is the error "Empty format string is not supported at the
end of a file.".
A leading UTF-8 BOM is skipped.
Example
M = dlmread('m.txt', ',', 1, 0) % the second row of m.txtDifferences from MATLAB: spreadsheet ranges such as 'A1..B2' and complex numbers are not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.