median
Return median values in DataMatrix object
Syntax
Med
= median(DMObj
)
Med
= median(DMObj
, Dim
)
Med
= median(DMObj
, Dim
, IgnoreNaN
)
Input Arguments
DMObj | DataMatrix object, such as created by |
Dim | Scalar specifying the dimension of
|
IgnoreNaN | Specifies if NaNs should be ignored. Choices are |
Output Arguments
Med | Either of the following:
|
Description
returns
the median values of the elements in the columns of a DataMatrix object,
treating NaNs as missing values. Med
= median(DMObj
)Med
is
a row vector containing the median values for elements in each column
in DMObj
.
returns
the median values of the elements in the columns or rows of a DataMatrix
object, as specified by Med
= median(DMObj
, Dim
)Dim
. If Dim
= 1
,
returns Med
, a row vector containing the
median values for elements in each column in DMObj
.
If Dim
= 2
, returns Med
,
a column vector containing the median values for elements in each
row in DMObj
. Default Dim
= 1
.
specifies
if NaNs should be ignored. Med
= median(DMObj
, Dim
, IgnoreNaN
)IgnoreNaN
can
be true
(default) or false
.
Version History
Introduced in R2008b
See Also
DataMatrix
| max
| mean
| min
| sum