Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

could anyone help me to solve the issue.

1 Ansicht (letzte 30 Tage)
Prabha Kumaresan
Prabha Kumaresan am 26 Mär. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 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 Kommentare
Rik
Rik am 26 Mär. 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 am 26 Mär. 2018
Bearbeitet: Stephen23 am 26 Mär. 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.

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by