Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

could anyone help me to solve the issue.

1 vue (au cours des 30 derniers jours)
Prabha Kumaresan
Prabha Kumaresan le 26 Mar 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
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 commentaires
Rik
Rik le 26 Mar 2018
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
Stephen23 le 26 Mar 2018
Modifié(e) : Stephen23 le 26 Mar 2018
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.

Réponses (0)

Cette question est clôturée.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by