HOW TO DIVIDE RANDOMLY
显示 更早的评论
a=[1 9 2 4 3 5 4 6 5 1 6 9 7 0 8 3 9 1 0 2 3 6 3 4 3 7 8 1 8 7 9 2 0 3 4 6 5 7 8 9 ] i want to divide this data into 5 groups RANDOMLY so taht the values in the column 1 and 2 should not change....... have to do this for large data also,can anyone help the output must be
采纳的回答
更多回答(1 个)
Andreas Goser
2011-9-19
0 个投票
- Move the data into the five groups as they are
- Create a set of random numbers with indices, e.g. (1,5), (2,3) etc.
- Flip the data using the random indices, e.g. flip data point group 1, element 5 with group 2, element 3
- Do this a reasonable amount of times
3 个评论
Andreas Goser
2011-9-19
Looks like you are going to the same university:
http://www.mathworks.com/matlabcentral/answers/16045-how-to-sort-into-groups
Pat
2011-9-19
Pat
2011-9-19
类别
在 帮助中心 和 File Exchange 中查找有关 Genomics and Next Generation Sequencing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!