Info
この質問は閉じられています。 編集または回答するには再度開いてください。
could anyone help me to solve the issue.
1 回表示 (過去 30 日間)
古いコメントを表示
code:
list_of_rng_seeds = [1 2 23]
num_rng = length(list_of_rng_seeds)
for rng_usage_idx = 1 : num_rng
this_seed = list_of_rng_seeds(rng_usage_idx)
fprintf('Below results are for rng = %d\n', this_seed)
rng(this_seed )
unused_rows=1:4
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
end
The above code works fine. but the list of rng seeds is mentioned as [1 2 23] inorder to have the combinations of 2 users in each group under the condition user present in one group should not be present in other group.Could anyone tell me how the code can be executed without mentioning the list of rng seeds values for different number of users and its combinations.
2 件のコメント
Rik
2018 年 3 月 26 日
You need to make a choice what you want. Either you want to randomize the groups, or you don't. You can of course use some elaborate function to generate a vector of seeds based on the number of groups. Is that what you want?
Stephen23
2018 年 3 月 26 日
編集済み: Stephen23
2018 年 3 月 26 日
See earlier questions and discussions:
@Prabha Kumaresan: please do not repeatedly ask the same question, or continuations of the same question. You might feel like asking lots of times is productive, but actually it make it harder for us to keep track of what information you have been given and what you have explained about the situation. It would be easier for everyone, including yourself, if you kept discussions on one topic within one thread.
回答 (0 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!