Could anyone help me to fix the issue
1 次查看(过去 30 天)
显示 更早的评论
code:
unused_rows=1:6
while ~isempty(unused_rows)
N_UE_rows=2;
rows=unused_rows(randsample(length(unused_rows),N_UE_rows))
[~,idx]=find(ismember(unused_rows,rows))
unused_rows(idx)=[]
end
If i run the code it works.but the number of rows for each group keep on changing if i run the code again and again.But what should be done inorder to fix the number of rows say for example(13,24,56).If i run the code for the next time i should get the same rows in each group(13,24,56).
2 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!