Findk
largest elements of array
B = maxk(A,k)
B = maxk(A,k,dim)
B = maxk(___,'ComparisonMethod',c)
[B,I] = maxk(___)
returns theB
= maxk(A
,k
)k
largest elements ofA
.
IfA
is a vector, thenmaxk
returns a vector containing thek
largest elements ofA
.
IfA
is a matrix, thenmaxk
returns a matrix whose columns contain thek
largest elements of each column ofA
.
IfA
is a multidimensional array, thenmaxk
returns thek
largest elements along the first dimension whose size does not equal 1.