Skip to Main Content Skip to Search
Product Documentation

minus (DataMatrix) - Subtract DataMatrix objects

Syntax

DMObjNew = minus(DMObj1, DMObj2)
DMObjNew = DMObj1 - DMObj2
DMObjNew = minus(DMObj1, B)
DMObjNew = DMObj1 - B
DMObjNew = minus(B, DMObj1)
DMObjNew = B - DMObj1

Input Arguments

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

Output Arguments

DMObjNewDataMatrix object created by subtraction.

Description

DMObjNew = minus(DMObj1, DMObj2) or the equivalent DMObjNew = DMObj1 - DMObj2 performs an element-by-element subtraction of the DataMatrix object DMObj2 from the DataMatrix object DMObj1 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 = minus(DMObj1, B) or the equivalent DMObjNew = DMObj1 - B performs an element-by-element subtraction of B, a numeric or logical array, from the DataMatrix object DMObj1, 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 = minus(B, DMObj1) or the equivalent DMObjNew = B - DMObj1 performs an element-by-element subtraction of the DataMatrix object DMObj1 from 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.

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

See Also

DataMatrix | plus

How To

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS