min
Return minimum values in DataMatrix object
Syntax
M
= min(DMObj1
)
[M
, Indices
]
= min(DMObj1
)
[M
, Indices
, Names
]
= min(DMObj1
)
... = min(DMObj1
,
[], Dim
)
MA
= min(DMObj1
, DMObj2
)
Input Arguments
DMObj1 , DMObj2 | DataMatrix objects, such as created by Note
|
Dim | Scalar specifying the dimension of
|
Output Arguments
M | One of the following:
|
Indices | Either of the following:
|
Names | Vector of the row names (if |
MA | Numeric array created from the minimum elements in either of the following:
|
Description
returns
the minimum value(s) in M
= min(DMObj1
)DMObj1
, a DataMatrix
object. If DMObj1
contains a vector of
data, M
is a scalar. If DMObj1
contains
a matrix of data, M
is a row vector containing
a minimum value in each column.
[
returns M
, Indices
]
= min(DMObj1
)Indices
,
the indices of the minimum value(s) in DMObj1
,
a DataMatrix object. If DMObj1
contains
a vector of data, Indices
is a positive
integer. If DMObj1
contains a matrix of
data, Indices
is a vector containing the
indices for the minimum value in each column (if Dim
= 1
)
or row (if Dim
= 2
).
If there are multiple minimum values in a column or row, the index
for the first value is returned.
[
returns M
, Indices
, Names
]
= min(DMObj1
)Names
,
a vector of the row names (if Dim
= 1
)
or column names (if Dim
= 2
)
corresponding to the minimum value in each column or each row ofDMObj1
,
a DataMatrix object. If there is more than one minimum value in a
column or row, the row or column name for the first value is returned.
... = min(
specifies which dimension
to return the minimum values for, that is each column or each row
in a DataMatrix object. If DMObj1
,
[], Dim
)Dim
= 1
,
returns M
, a row vector containing the
minimum value in each column. If Dim
= 2
,
returns M
, a column vector containing the
minimum value in each row. Default Dim
= 1
.
returns MA
= min(DMObj1
, DMObj2
)MA
,
a numeric array containing the smaller of the two values from each
position of DMObj1
and DMObj2
. DMObj1
and DMObj2
can
both be DataMatrix objects, or one can be a DataMatrix object and
the other a numeric array. They must be the same size, unless one
is a scalar. MA
has the same size (number
of rows and columns) as the first nonscalar input.
Version History
Introduced in R2008b
See Also
DataMatrix
| max
| sum