Computes the median of each of the matrix columns.
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public static DoubleVector Median( DoubleMatrix A ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function Median ( _ A As DoubleMatrix _ ) As DoubleVector |
| Visual C++ |
|---|
public: static DoubleVector^ Median( DoubleMatrix^ A ) |
Parameters
- A
- Type: CenterSpace.NMath.Core..::.DoubleMatrix
A matrix.
Return Value
A vector.
Remarks
Each column vector is sorted. If the vector has an odd number of
elements the middle number is used. Otherwise, the mean of
the two middle numbers is used.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if A has zero rows. |