Randomly select x% of elements in a array/matrix

You could use again sample together with view:

view(m, :, sample(1:100,10,replace=false))