how select random n element af array without replacement

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

질문:

2016년 10월 9일

답변:

2016년 10월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by