Write the matrix a to the text file using delimiters.
- delim
- the delimiter to use to separate values on a row
- r
- the number of delimiter-only lines to add to the start of the file
- c
- the number of delimiters to prepend to each line of data.
- "-append"
- append to the end of the file.
- "append", state
- Either ‘"on"’ or ‘"off"’. See ‘"-append"’ above.
- "delimiter", d
- See delim above.
- "newline", os
- 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", r
- See r above.
- "coffset", c
- See c above.
- "precision", p
- 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.
A = reshape(1:16,4,4); dlmwrite("file.csv", A)dlmwrite ("file.tex", a, "delimiter", "&", "newline", "\\n")