Info
此问题已关闭。 请重新打开它进行编辑或回答。
could anyone tell me what value of seeds needs to be used for getting all possible combinations of 6.
2 次查看(过去 30 天)
显示 更早的评论
code:
N_UE=[6];
N_rng=[1 4 6 11 31 153]
for t=1:length(N_UE)
for s=1:length(N_rng)
this_seed = N_rng(s);
fprintf('Below results are for rng = %d\n', this_seed)
rng(this_seed);
unused_rows=1:N_UE(t);
while ~isempty(unused_rows)
N_UE_rows=ceil(sqrt(randi([numel(unused_rows)])));
rows=unused_rows(randsample(length(unused_rows),N_UE_rows))
[~,idx]=find(ismember(unused_rows,rows));
unused_rows(idx)=[];
end
end
end
when i run the above code
i am getting the following result
N_rng =1 4 6 11 31 153
Below results are for rng = 1
rows = 2 5
rows = 1 4
rows = 6
rows = 3
Below results are for rng = 4
rows = 5 1 4
rows = 2
rows = 3
rows = 6
Below results are for rng = 6
rows =3 4 1
rows =2 6
rows =5
Below results are for rng = 11
rows =6 1
rows =5 4
rows =3 2
Below results are for rng = 31
rows = 5 4
rows = 1
rows = 2
rows = 3
rows = 6
Below results are for rng = 153
rows =4
rows =3
rows =2
rows =5
rows =6
rows =1
But i want to get the following left out combinations as well
--------------
rows =6 4 1
rows =5 2 3
-----------
rows =1 2 3 4 5
rows =6
------------------
rows =1 2 3 4
rows =5 6
----------------
rows =1 2 3 4
rows =5
rows =6
---------------
could anyone help me what values of rng seed need
to be used in the above code to get the above left out combinations.
1 个评论
Jan
2018-5-2
It has been asked already, if you and jaah navi are the same person or working together. In the first case, delete one of the two accounts, because mixing the same questions between different accounts is rather confusing. If you work together, please think of letting one person post the questions only.
The comments there are important already. A random approach to find all combinations is a very bad idea. It is unlikely, that a "solution" is useful, because it might run for a very long time, perhaps some millions of years.
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!