Info

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

OFDMA grouping of users

1 visualización (últimos 30 días)
Prabha Kumaresan
Prabha Kumaresan el 20 de Dic. de 2017
Cerrada: Jan el 8 de En. de 2018
could anyone help me to execute the following code as I am getting error
N_UE=[2 4 6 8 10];
for t= 1:length(N_UE)
s=randperm(N_UE(t))
numGroups = 5; % Need to divide s up into 5 groups
divisions = sort(randperm(s, numGroups) , 'ascend')
divisions = [0, divisions, s]
groups = cell(1, numGroups);
for k = 1 : numGroups
indexes = divisions(k)+1:divisions(k+1);
% Assign users to the kth group:
usersInThisGroups = length(indexes);
fprintf('Assigning %d users (indexes %d to %d) to group %d.\n', ...
usersInThisGroups, divisions(k)+1,divisions(k+1), k);
groups{k} = s(indexes);
end
celldisp(groups); % Display groups in command window.
end
  1 comentario
ANKUR KUMAR
ANKUR KUMAR el 20 de Dic. de 2017
Is this forum a joke for you and few your batchmates. The same to same program is already asked by someone and you are posting it again. Another program for the same problem is also asked by the different user. In the past 20 minutes, I have seen 3 people asking the problem of the same question and for the same program.
I think you are asking the same question twice on this forum. https://in.mathworks.com/matlabcentral/answers/373805-how-to-solve-the-error
Try using debugger to resolve your problem.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by