colnames
Retrieve or set column names of DataMatrix object
Syntax
ReturnColNames =
colnames(DMObj)
ReturnColNames =
colnames(DMObj, ColIndices)
DMObjNew =
colnames(DMObj, ColIndices, ColNames)
Input Arguments
DMObj | DataMatrix object, such as created by |
ColIndices | One or more columns in
|
ColNames | Column names specified by any of the following:
Note The number of elements in |
Output Arguments
ReturnColNames | Character vector or cell array of character vectors containing column
names in DMObj. |
DMObjNew | DataMatrix object created with names specified by
|
Description
returns
ReturnColNames =
colnames(DMObj)ReturnColNames, a cell array of character vectors
specifying the column names in DMObj, a DataMatrix
object.
returns the column names specified by ReturnColNames =
colnames(DMObj, ColIndices)ColIndices.
ColIndices can be a positive integer, vector of positive
integers, character vector specifying a column name, cell array of character vectors, or
a logical vector.
returns DMObjNew =
colnames(DMObj, ColIndices, ColNames)DMObjNew, a DataMatrix object with columns specified
by ColIndices set to the names specified by
ColNames. The number of elements in
ColIndices must equal the number of elements in
ColNames.
Version History
Introduced in R2008b