Function Reference
— Function File: dlmwrite (file, a)
— Function File: dmlwrite (file, a, delim, r, c)
— Function File: dmlwrite (file, a, key, val ...)
— Function File: dmlwrite (file, a, "-append", ...)

Write the matrix a to the named file using delimiters.

The parameter delim specifies the delimiter to use to separate values on a row.

The value of r specifies the number of delimiter-only lines to add to the start of the file.

The value of c specifies the number of delimiters to prepend to each line of data.

If the argument "-append" is given, append to the end of the file.

In addition, the following keyword value pairs may appear at the end of the argument list:

"append"
Either ‘"on"’ or ‘"off"’. See ‘"-append"’ above.
"delimiter"
See delim above.
"newline"
The character(s) to use to separate each row. Three special cases exist for this option. ‘"unix"’ is changed into '\n', ‘"pc"’ is changed into '\r\n', and ‘"mac"’ is changed into '\r'. Other values for this option are kept as is.
"roffset"
See r above.
"coffset"
See c above.
"precision"
The precision to use when writing the file. It can either be a format string (as used by fprintf) or a number of significant digits.
          dlmwrite ("file.csv", reshape (1:16, 4, 4));
          dlmwrite ("file.tex", a, "delimiter", "&", "newline", "\\n")