get (DataMatrix)

Retrieve information about DataMatrix object

Syntax

get(DMObj)
DMStruct = get(DMObj)
PropertyValue = get(DMObj, 'PropertyName')
[Property1Value, Property2Value, ...] = get(DMObj, 'Property1Name', 'Property2Name', ...)

Input Arguments

DMObjDataMatrix object, such as created by DataMatrix (object constructor).
PropertyNameProperty name of a DataMatrix object.

Output Arguments

DMStructScalar structure, in which each field name is a property of a DataMatrix object, and each field contains the value of that property.
PropertyValueValue of the property specified by PropertyName.

Description

get(DMObj) displays all properties and their current values of DMObj, a DataMatrix object.

DMStruct = get(DMObj) returns all properties of DMObj, a DataMatrix object, to DMStruct, a scalar structure, in which each field name is a property of a DataMatrix object, and each field contains the value of that property.

PropertyValue = get(DMObj, 'PropertyName') returns the value of the specified property of DMObj, a DataMatrix object.

[Property1Value, Property2Value, ...] = get(DMObj, 'Property1Name', 'Property2Name', ...) returns the values of the specified properties of DMObj, a DataMatrix object.

Properties of a DataMatrix Object

PropertyDescription
Name

String that describes the DataMatrix object. Default is ''.

RowNames

Empty array or cell array of strings that specifies the names for the rows, typically gene names or probe identifiers. The number of elements in the cell array must equal the number of rows in the matrix. Default is an empty array.

ColNames

Empty array or cell array of strings that specifies the names for the columns, typically sample identifiers. The number of elements in the cell array must equal the number of columns in the matrix.

NRows

Positive number that specifies the number of rows in the matrix.

NCols

Positive number that specifies the number of columns in the matrix.

NDims

Positive number that specifies the number of dimensions in the matrix.

ElementClass

String that specifies the class type, such as single or double.

Examples

  1. Load the MAT-file, provided with the Bioinformatics Toolbox™ software, that contains yeast data. This MAT-file includes three variables: yeastvalues, a matrix of gene expression data, genes, a cell array of GenBank® accession numbers for labeling the rows in yeastvalues, and times, a vector of time values for labeling the columns in yeastvalues.

    load filteredyeastdata
    
  2. Import the microarray object package so that the DataMatrix constructor function will be available.

    import bioma.data.*
    
  3. Create a DataMatrix object from the gene expression data in the first 30 rows of the yeastvalues matrix. Use the genes column vector and times row vector to specify the row names and column names.

    dmo = DataMatrix(yeastvalues(1:30,:),genes(1:30,:),times);
    
  4. Use the get method to display the properties of the DataMatrix object, dmo.

    get(dmo)
    
               Name: ''
            RowNames: {30x1 cell}
            ColNames: {'   0'  ' 9.5'  '11.5'  '13.5'  '15.5'  '18.5'  '20.5'}
               NRows: 30
               NCols: 7
               NDims: 2
        ElementClass: 'double'

See Also

|

Was this topic helpful?