Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
OFDMA grouping of users
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
ANKUR KUMAR
am 20 Dez. 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.
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!