59 lines
1.8 KiB
Mathematica
59 lines
1.8 KiB
Mathematica
![]() |
function RU_index = RU_alloc(cfgUI)
|
|||
|
if cfgUI.numUsers == 1
|
|||
|
f_occupy = strcat(num2str((cfgUI.user1.f)'));
|
|||
|
switch f_occupy.'
|
|||
|
case '1111'
|
|||
|
RU_index = 192;% 空分
|
|||
|
case '1100'
|
|||
|
RU_index = 96;% 106 频分
|
|||
|
case '0011'
|
|||
|
RU_index = 96;% 242 空分
|
|||
|
case '1000'
|
|||
|
RU_index = 112;% 52 频分
|
|||
|
case '0100'
|
|||
|
RU_index = 112;% 52 频分
|
|||
|
case '0010'
|
|||
|
RU_index = 112;% 52 频分
|
|||
|
case '0001'
|
|||
|
RU_index = 112;% 52 频分
|
|||
|
otherwise
|
|||
|
RU_index = 192;
|
|||
|
end
|
|||
|
RU_index = 192; % 为保证代码正常运行的权宜之计
|
|||
|
elseif cfgUI.numUsers == 2
|
|||
|
f_occupy = strcat(num2str((cfgUI.user1.f + cfgUI.user2.f)'));
|
|||
|
switch f_occupy.'
|
|||
|
case '2222'
|
|||
|
RU_index = 193;% 242 空分
|
|||
|
case '1111'
|
|||
|
RU_index = 96;% 106 频分
|
|||
|
case '2200'
|
|||
|
RU_index = 100;% 242 空分
|
|||
|
case '0022'
|
|||
|
RU_index = 97;% 52 频分
|
|||
|
case '1110'
|
|||
|
RU_index = 24;% 52 频分
|
|||
|
case '1101'
|
|||
|
RU_index = 24;% 52 频分
|
|||
|
case '0011'
|
|||
|
RU_index = 24;% 52 频分
|
|||
|
case '1011'
|
|||
|
RU_index = 16;% 52 空分
|
|||
|
case '0111'
|
|||
|
RU_index = 16;% 52 频分
|
|||
|
case '1100'
|
|||
|
RU_index = 16;% 3用户,前106空分
|
|||
|
case '1001'
|
|||
|
RU_index = 112;% 52 频分
|
|||
|
case '1010'
|
|||
|
RU_index = 112;% 52 空分
|
|||
|
case '0101'
|
|||
|
RU_index = 112;% 52 频分
|
|||
|
case '0110'
|
|||
|
RU_index = 112;% 3用户,前106空分
|
|||
|
otherwise
|
|||
|
RU_index = 193;
|
|||
|
end
|
|||
|
RU_index = 193; % 为保证代码正常运行的权宜之计
|
|||
|
end
|
|||
|
end
|