MATLAB Functions Help Desk

dlmwrite

Purpose

Write a matrix to an ASCII delimited file

Syntax

Description

The dlmwrite command converts a MATLAB matrix into an ASCII-format file readable by spreadsheet programs.

dlmwrite(filename,A,delimiter) writes matrix A into the upper left-most cell of the ASCII-format spreadsheet file filename, and uses the delimiter to separate matrix elements. Specify '\t' to produce tab-delimited files. 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.

dlmwrite(filename,A,delimiter,r,c) writes A into filename, starting at spreadsheet cell r and c, with delimiter used to separate matrix elements.

Arguments

delimiter

The character separating individual matrix elements in the ASCII- format spreadsheet file. A comma (,) is the default delimiter.

r,c

The spreadsheet cell into which the upper-left-most matrix element is written.

See Also

dlmread     Read an ASCII delimited file into a matrix

wk1read     Read a Lotus123 WK1 spreadsheet file into a matrix

wk1write    Write a matrix to a Lotus123 WK1 spreadsheet file



[ Previous | Help Desk | Next ]