How to randomly and uniquely select 2000 samples from an array with 1x460800.
1 view (last 30 days)
Show older comments
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226059/image.jpeg)
Any help much appreciated.
0 Comments
Accepted Answer
More Answers (1)
Alex Mcaulley
on 24 Jun 2019
Being A your array and N the number of random samples you want:
B = A(randperm(numel(A),N));
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!