Random generator from a sample with replacement
5 次查看(过去 30 天)
显示 更早的评论
Hi. I'm trying to draw 1000 samples with replacement from a dataset that contains 22k observations. I tried the code: datasample(y,1000,size(y,1)); but it's not working. I also tried y(randi([1,22528],22528,1000)); but I guess this provides me with samples with NO replacement. Any idea will be highly appreciated!
Thanks
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!