plus (DataMatrix) - Add DataMatrix objects

Syntax

DMObjNew = plus(DMObj1, DMObj2)
DMObjNew = DMObj1 + DMObj2
DMObjNew = plus(DMObj1, B)
DMObjNew = DMObj1 + B
DMObjNew = plus(B, DMObj1)
DMObjNew = B + DMObj1

Arguments

DMObj1, DMObj2DataMatrix objects, such as created by DataMatrix (object constructor).
BMATLAB numeric or logical array.

Return Values

DMObjNewDataMatrix object created by addition.

Description

DMObjNew = plus(DMObj1, DMObj2) or the equivalent DMObjNew = DMObj1 + DMObj2 performs an element-by-element addition of the DataMatrix objects DMObj1 and DMObj2 and places the results in DMObjNew, another DataMatrix object. DMObj1 and DMObj2 must have the same size (number of rows and columns), unless one is a scalar (1-by-1 DataMatrix object). The size (number of rows and columns), row names, and column names for DMObjNew are the same as DMObj1, unless DMObj1 is a scalar; then they are the same as DMObj2.

DMObjNew = plus(DMObj1, B) or the equivalent DMObjNew = DMObj1 + B performs an element-by-element addition of DMObj1, a DataMatrix object, and B, a numeric or logical array, and places the results in DMObjNew, another DataMatrix object. DMObj1 and B must have the same size (number of rows and columns), unless B is a scalar. The size (number of rows and columns), row names, and column names for DMObjNew are the same as DMObj1.

DMObjNew = plus(B, DMObj1) or the equivalent DMObjNew = B + DMObj1 performs an element-by-element addition of B, a numeric or logical array, and DMObj1, a DataMatrix object, and places the results in DMObjNew, another DataMatrix object. DMObj1 and B must have the same size (number of rows and columns), unless B is a scalar. The size (number of rows and columns), row names, and column names for DMObjNew are the same as DMObj1.

MATLAB calls DMObjNew = plus(X, Y) for the syntax DMObjNew = X + Y when X or Y is a DataMatrix object.

See Also

Bioinformatics Toolbox function: DataMatrix (object constructor)

Bioinformatics Toolbox object: DataMatrix object

Bioinformatics Toolbox method of a DataMatrix object: minus

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS