dmwrite
Write DataMatrix object to text file
Syntax
dmwrite(DMObj, File)
dmwrite(..., 'Delimiter', DelimiterValue,
...)
dmwrite(..., 'Precision', PrecisionValue,
...)
dmwrite(..., 'Header', HeaderValue,
...)
dmwrite(..., 'Annotated', AnnotatedValue,
...)
dmwrite(..., 'Append', AppendValue,
...)
Arguments
DMObj | DataMatrix object, such as created by |
File | Character vector specifying either a file name or a path and file name for saving the text file. |
DelimiterValue | Character vector specifying a delimiter symbol to use as a matrix column separator. Typical choices are:
|
PrecisionValue | Precision for writing the data to the text file, specified by either:
Default is |
HeaderValue | Character vector specifying the first line of the text
file. Default is the |
AnnotatedValue | Controls the writing of row and column names to the text
file. Choices are |
AppendValue | Controls the appending of |
Description
dmwrite( writes
a DataMatrix object to a text file using the delimiter DMObj, File)\t to
separate DataMatrix columns. dmwrite writes the
data starting at the first column of the first row in the destination
file.
dmwrite(..., ' calls PropertyName', PropertyValue,
...)dmwrite with optional properties
that use property name/property value pairs. You can specify one or
more properties in any order. Enclose each PropertyName in
single quotation marks. Each PropertyName is
case insensitive. These property name/property value pairs are as
follows:
dmwrite(..., 'Delimiter', specifies a delimiter symbol to use as a column separator
for separating matrix columns. Default is DelimiterValue,
...)'\t'.
dmwrite(..., 'Precision', specifies the precision for writing the data to the
text file. Default is PrecisionValue,
...)5.
dmwrite(..., 'Header', specifies the first line of the text file. Default
is the HeaderValue,
...)Name property for the DataMatrix object.
dmwrite(..., 'Annotated', controls the writing of row and column names to the
text file. Choices are AnnotatedValue,
...)true (default) or false.
dmwrite(..., 'Append', controls the appending of AppendValue,
...)DMObj to File when
it is an existing file. Choices are true or false (default).
If false, dmwrite overwrites File.
Examples
Create a DataMatrix object and write the contents to a text file:
% Create a DataMatrix object
dmobj = bioma.data.DataMatrix(rand(2,3), {'Row1', 'Row2'}, ...
{'Col1', 'Col2', 'Col3'})
% Write the DataMatrix object to a text file
dmwrite(dmobj,'testdm.txt')
Version History
Introduced in R2009b