问题:
进行LTE问题分析,想看看一个TTI内prb占用情况。由于需要分析的数据比较多,手动画图不现实,就用matlab来实现了。
程序:
X = [0.01:0.01:1]; % x axis
Y = [1:100]; % y axis, 100prbs, X, Y Matrix dimensions must agree.
C = ones(100); % Init color
% For different ue, first rb and number of rb is different
first_rb = [75, 73, 68, 87, 63, 83, 81, 79, 71, 61, 59, 57, 55, 48, 53, 42, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 66, 20];
nrof_rb = 2; % In this case, all Ues have same rb size
nrof_ue = length(first_rb);
for ue_loop = 1:nrof_ue
C(first_rb(ue_loop) + 1:first_rb(ue_loop) + 1 + nrof_rb - 1,:) = 0;
end
C(25:26,:) = 0.5; % mark one ue, use different color
colormap(hot(3))
% colormap(gray(3)) % or use different color
pcolor(X,Y,C)