Sum of k largest elements of input vector x.

sumlargest(x, k)

Arguments

x

input vector.

k

a positive integer.