MATLAB Function Reference
  Go to function:
    Search    Help Desk 
dlmwrite    See Also

Write a matrix to an ASCII delimited file

Syntax

Description

The dlmwrite command a MATLAB matrix.

dlmwrite(filename,A,delimiter) converts matrix A into an ASCII-format file, readable by spreadsheet programs. The data is written to the upper left-most cell of the spreadsheet filename, using delimiter to separate matrix elements. A comma (,) is the default delimiter. Use '\t' to produce tab-delimited files.

dlmwrite(filename,A,delimiter,r,c) converts matrix A into an ASCII-format file, readable by spreadsheet programs, using delimiter to separate matrix elements. The data is written to the spreadsheet filename, starting at spreadsheet cell r and c, where r is the row offset and c is the column offset.r and c are zero based so that r=0, c=0 specifies the first value in the file, which is the upper left corner. A comma (,) is the default delimiter. Use '\t' to specify a tab delimiter.

Remarks

Any elements whose value is 0 will be omitted. For example, the array [1 0 2] will appear in a file as '1,,2' when the delimiter is a comma.

See Also

dlmread, wk1read, wk1write



[ Previous | Help Desk | Next ]