Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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

1 回表示 (過去 30 日間)
Prabha Kumaresan
Prabha Kumaresan 2018 年 4 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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