Contents
Previous
Next
Subchapters
Current Chapters->
prctile
ftail
tpdf
ttail
ittail
cnormal
inormal
rand
snormal
seed
colmad
colmse
colrange
colmode
kurtosis
skewness
randperm
ranseed
unifm0v1
unirnd
normrnd
exprnd
gamrnd
cauchyrnd
gumbelrnd
laplacernd
lognrnd
wblrnd
binornd
poissrnd
exppdf
expcdf
normpdf
unifpdf
unifcdf
wblpdf
wblcdf
colcor
colcov
colmean
colstd
colmax
rowmax
colsum
rowsum
colnorm
rownorm
median
colmedian
colmead
colvar
corr
conv
conv2
sum
cumsum
prod
cumprod
Parent Chapters->
Omatrix6
statistics
colmode
Search Tools->
contents
reference
index
search
Computing The Mode of Each Column
Syntax
colmode(
x
)
See Also
colrange
,
colmedian
,
colmean
,
sort
Description
Returns a row vector containing the mode, (the most frequently occurring value), of each column of
x
, where
x
is an integer, real, or double-precision matrix. The return value has the same type and column dimension as
x
.
Example
X = {[3., 3, 1, 4], ...
[0, 0, 1, 1], ...
[0, 1, 2, 4]}
colmode(X)
returns
[ 0 , 0 , 1 , 1 ]