Skip to Main Content Skip to Search
Product Documentation

numel (DataMatrix) - Return number of elements in DataMatrix object

Syntax

N = numel(DMObj)
Ns = numel(DMObj, Index1, Index2)

Input Arguments

DMObjDataMatrix object, such as created by DataMatrix (object constructor).
Index1A row or range of rows in DMObj specified by a positive integer or a range using the format x:y, where x is the first row and y is the last row.
Index2A column or range of columns in DMObj specified by a positive integer or a range using the format x:y, where x is the first column and y is the last column.

Output Arguments

NPositive integer representing the number of elements in DMObj, a DataMatrix object.
NsPositive integer representing the number of subscripted elements in DMObj, a DataMatrix object.

Description

N = numel(DMObj) returns 1. To find the number of elements in DMObj, a DataMatrix object, use either of the following syntaxes:

prod(size(DMObj))
numel(DMObj,':',':')

Ns = numel(DMObj, Index1, Index2) returns the number of subscripted elements in DMObj, a DataMatrix object. Index1 specifies a row or range of rows in DMObj. Index2 specifies a column or range of columns in DMObj.

See Also

DataMatrix

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