?? mrequest.m
字號:
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -