numel
Return number of elements in DataMatrix object
Syntax
N
= numel(DMObj
)
Ns
= numel(DMObj
, Index1
, Index2
)
Input Arguments
DMObj | DataMatrix object, such as created by DataMatrix (object
constructor). |
Index1 | A 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. |
Index2 | A 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
N | Positive integer representing the number of elements in DMObj ,
a DataMatrix object. |
Ns | Positive integer representing the number of subscripted elements
in DMObj , a DataMatrix object. |
Description
returns N
= numel(DMObj
)1
.
To find the number of elements in DMObj
,
a DataMatrix object, use either of the following syntaxes:
prod(size(DMObj)) numel(DMObj,':',':')
returns
the number of subscripted elements in Ns
= numel(DMObj
, Index1
, Index2
)DMObj
,
a DataMatrix object. Index1
specifies a
row or range of rows in DMObj
. Index2
specifies
a column or range of columns in DMObj
.
Version History
Introduced in R2008b