フィルターのクリア

how select random n element af array without replacement

2 ビュー (過去 30 日間)
zohre saeedi
zohre saeedi 2016 年 10 月 9 日
回答済み: Walter Roberson 2016 年 10 月 9 日
I have array with m members. how I can select 10 member of it randomly and without replacement?

採用された回答

KSSV
KSSV 2016 年 10 月 9 日
編集済み: KSSV 2016 年 10 月 9 日
Let a be your array..to select 10 memebers randomly out of a use
iwant = randsample(a,10)

その他の回答 (2 件)

Walter Roberson
Walter Roberson 2016 年 10 月 9 日
samples = YourArray(randperm(m, 10)); %without replacement

zohre saeedi
zohre saeedi 2016 年 10 月 9 日
thanks for your help

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by