MATLAB: How to randomly and uniquely select 2000 samples from an array with 1×460800.

#array #random #unique

Any help much appreciated.

Best Answer

val(randperm(numel(val),2000))