Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
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.

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by