random permutation with repetition for > 2000 elements
2 次查看(过去 30 天)
显示 更早的评论
Hi
randperm is for permutations WITHOUT repetition. I would need it WITH repetition. I could calculate all permutations (I found some scripts), but I need it for vectors with more than 2000 elements. Any ideas?
Thanks so much
Claudia
0 个评论
采纳的回答
Image Analyst
2013-12-1
Try this
randomNumbers = randi(highestNumber, rows, columns);
plug in whatever values you want, for example:
randomNumbers = randi(9, 1, 2000); % 2000 numbers in the range 1-9.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!