mrequest.m
来自「基于OFDM的无线宽带系统仿真It contains mainly two pa」· M 代码 · 共 24 行
M
24 行
function nmob = mrequest(sofftraf, slope)% DESCRIPTION nmob = mrequest(sofftraf, slope)% Generate new users requesting a base and channel assignment.% veclength is the number of inactive users from which we% select nmobavg users in average that are going to be active.% 100 is the minimum pool of inactive users when nmobavg is small.% INPUT % sofftraf -- The traffic offered to the simulated system.% slope -- Ratio dt to mht.% OUTPUT% nmob -- A realisation of number of new users to create.% TRY % mrequest(1000, 0.01)% mrequest(1000, inf)% SEE ALSO % terminate% by Magnus Almgren 000508nmobavg = sofftraf *(1-exp(-slope)); veclength = round(max(100, 10*nmobavg)); nmob = sum(rand(veclength,1) < nmobavg/veclength);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?