How to subset rows with reproducibility?
1 回表示 (過去 30 日間)
古いコメントを表示
If I have a 10 by 5 matrix, how would I subset the data so that the same rows are selected each time?
I know how to select 10 random rows, but I'm unsure how to make it reproducible.
0 件のコメント
採用された回答
Star Strider
2018 年 2 月 20 日
If you’re using a random number generator to select the rows, see the documentation for the rng (link) function. Otherwise, just select them yourself, for example [3 9 5 2 7], or whatever combination you want.
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!