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

1 回表示 (過去 30 日間)
Md Imp
Md Imp 2019 年 6 月 24 日
コメント済み: Md Imp 2019 年 6 月 24 日
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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by