Info
この質問は閉じられています。 編集または回答するには再度開いてください。
OFDMA grouping of users
1 回表示 (過去 30 日間)
古いコメントを表示
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
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!