systeminitialize.m
来自「ofdm系统当中的接纳控制技术 程序当中有三种接纳控制算法的对比 都是基于ofd」· M 代码 · 共 33 行
M
33 行
function [TrafficType, DataArriveRate, DelayRequire, Integra] = SystemInitialize(N,Strategy,PercentOfRealTime)%定义QoS参数switch Strategy case 0 TrafficType = 3 .* ones(1,N); %全部初始化为VoIP的用户 DataArriveRate = 10e3 .* ones(1,N); %约为10kbps DelayRequire = 0.25 .* ones(1,N); %s,250ms Integra = ones(1,N); case 1 for a = 1:N if rand() < PercentOfRealTime TrafficType(a) = 4; %video DataArriveRate(a) = 32e3; DelayRequire(a) = 100; Integra(a) = 1.5; else TrafficType(a) = 2; %FTP DataArriveRate(a) = 1e6; DelayRequire(a) = 1e30; Integra(a) = 1; end end case 2 TrafficType = 4. * ones(1,N);%全部初始化为Video用户 DataArriveRate = 32e3 .* ones(1,N);%初始化平均速率为320Kbps DelayRequire = 100 .* ones(1,N);%时延200ms/2ms Integra = ones(1,N); end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?