This MATLAB function returns k observations sampled uniformly at random, with replacement, from the data in data.
uk.mathworks.com