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!