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
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!