Skip to content

dlmread

Read a delimited text file into a matrix.

M = dlmread(filename)
M = dlmread(filename, dlm)
M = dlmread(filename, dlm, row, col)
M = dlmread(filename, dlm, range)

Like csvread but with a configurable column delimiter dlm (any single character — comma, tab, semicolon, etc.). With no dlm, auto-detects.

dlmread('data.tsv', '\t')
dlmread('data.txt', ';', 1, 0)
  • dlmwrite — Write a matrix to a delimited text file.
  • csvread — Read a CSV file into a matrix.
  • readtable — Read tabular data from a file into a table.