[MATLAB] 画出LTE RB占用图

本文介绍了如何利用MATLAB实现LTE物理资源块(PRB)在TTI内的占用情况分析。通过编写程序,借助pcolor和colormap函数,能够有效地处理大量数据并生成PRB占用图。
摘要由CSDN通过智能技术生成

问题:

进行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)

结果:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值