Skip to content

csvwrite

Write a matrix to a CSV file.

csvwrite(filename, M)
csvwrite(filename, M, row, col)

Writes numeric matrix M to filename as a comma-separated text file. With row and col (0-based), writes starting from that offset (overwriting other content).

csvwrite('output.csv', magic(5))
  • csvread — Read a CSV file into a matrix.
  • dlmwrite — Write a matrix to a delimited text file.