Info

此问题已关闭。 请重新打开它进行编辑或回答。

OFDMA grouping of users

1 次查看(过去 30 天)
Prabha Kumaresan
Prabha Kumaresan 2017-12-20
关闭: Jan 2018-1-8
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 个评论
ANKUR KUMAR
ANKUR KUMAR 2017-12-20
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.

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by