Is it possible to obtain a random sample of values from a matrix without the randsample tool?
1 回表示 (過去 30 日間)
古いコメントを表示
Is it possible to obtain a random sample of values from a matrix without the randsample tool?
0 件のコメント
採用された回答
Azzi Abdelmalek
2012 年 11 月 24 日
編集済み: Azzi Abdelmalek
2012 年 11 月 24 日
A=magic(6);
out=A(randi(numel(A),1))
if you want 3 values for example
out=A(randi(numel(A),3,1))
その他の回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!