How to randomly and uniquely select 2000 samples from an array with 1x460800.

조회 수: 2 (최근 30일)
Any help much appreciated.

채택된 답변

madhan ravi
madhan ravi 2019년 6월 24일
val(randperm(numel(val),2000))

추가 답변 (1개)

Alex Mcaulley
Alex Mcaulley 2019년 6월 24일
Being A your array and N the number of random samples you want:
B = A(randperm(numel(A),N));

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by