Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
Prabha Kumaresan
Prabha Kumaresan el 4 de Abr. de 2018
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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.

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by