How random sample rows through many ranges of a matrix and delete from the original one and print in another one?
1 次查看(过去 30 天)
显示 更早的评论
I generated a lot of outputs from a DFT rotine and put all of them in a single sheet and imported as a matrix to MATLAB, something like:
U n m erg
0 0,0833 0,0833 -2
0,050 0,08333 0,0833 -2
0,100 0,0833 0,0833 -2
0,150 0,0833 0,0833 -2
...
6 0,0833 0,0833 -2
...
20,00 0,0833 0,0833 -2
It goes from 0 to 20 for each test, so the whole matrix keeps repeating from 0 to 20 until I have almost 20k rows.
What I need is to random sample 40 rows from 0 to 6, then another 40 from 6 to 20, through the whole matrix. I want to able to sample and delete from the original one and print in another matrix.
Is it possible to automatize the whole process and/or is easier if I keep repeating the sampling manually?
Thank you.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!