Info

This question is closed. Reopen it to edit or answer.

Could anyone help me to implement the scenarios for the code given

1 view (last 30 days)
code:
for s=1:length(N_rng)
this_seed = N_rng;
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; % for first scenario
N_UE_rows=ceil(sqrt(randi([numel(unused_rows)])));% for second scenario
if (N_UE_rows+1)==numel(unused_rows);
N_UE_rows=numel(unused_rows);
end
rows=unused_rows(randsample(length(unused_rows),N_UE_rows))
[~,idx]=find(ismember(unused_rows,rows));
unused_rows(idx)=[];
end
end
For the above code i need to implement two different scenario
for N_rng
first scenario - N_rng1=[1 2 23]; using N_UE_rows=2
second scenario- N_rng2=[1 2 5 6 9 11 12 19 47 74 84 91 153];
using
N_UE_rows=ceil(sqrt(randi([numel(unused_rows)])));
Could anyone help me to implement it.

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!