Sum of k smallest elements of input vector x.

sumsmallest(x, k)

Arguments

x

input vector.

k

a positive integer.