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 21 Mär. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
If there are 4 users in the system say(1,2,3,4) and i want to form pair such that each pairs should contain 2 users under the condition user present in one pair should not be present in other pair.with respect to 4 users 2 pairs can be formed with 3 different combinations combination1 - (12),(34) combination2 - (13),(24) combination3 - (14),(23)
I have written the code
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
If i run the code i can get the result for only one combination but how to get the result for the other two combinations.
could anyone help me to solve this issue

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by