资源简介
网络数据包丢失模型matlab代码 Gilbert Elliot Model 丢包模型
代码片段和文件信息
%If p is the probability of transferring from Good State to the bad state
%and if r is the probability of transferring from the bad state to the Good
%state given the p and r values this code will generate a packet loss
%pattern (with burst losses) and save it to a file named Loss_Pattern.txt.
clc
p = 0.02777;
r = 0.25;
total_packs = 10000;
check = 100;
while check >= 10
good = 1;
packets = [];
size = 1;
while size <= total_packs
if good == 1
packets = [packets good];
good = rand(1) > p;
elseif good == 0
packets = [packets good];
good = rand(1) > (1-r);
else
fprintf(‘error\n‘);
break;
end
size = size + 1;
end
fid = fopen(‘Loss_Pattern.txt‘‘w‘);
fprintf(fid ‘%d ‘ packets);
fclose(fid);
received_packs = nnz(packets);
theo_pack_loss_rate = 1 - r / (p+r);
act_pack_loss_rate = 1 - received_packs/total_packs;
check = abs(theo_pack_loss_rate - act_pack_loss_rate) / theo_pack_loss_rate * 100;
end
packets
theo_pack_loss_rate = p / (p+r)
act_pack_loss_rate = 1 - received_packs/total_packs
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1082 2017-09-25 19:49 Gilbert Elliot Model.m
文件 20000 2017-09-25 19:55 Loss_Pattern.txt
- 上一篇:基于nsct+pcnn的图像融合
- 下一篇:Polar码SCL译码算法
相关资源
- Matlab SIS model code
- 光伏电池组 局部阴影时输出模型 P-
- matlab混合高斯背景建模
- KaYaModel.mta
- Elhorst_files_matlab_spatial_modeling.zip
-
三相逆变器simuli
nk仿真模型 - matlab开发-kmvcreditriskmodel违约风险概率
- arma模型_matlab源码
- matlab 高斯过程回归模型 matlab Gaussia
-
Simuli
nk EKF vehicle model - 灰色预测模型GM(1n) Matlab程序
- 三相锁相matlab PLL
- jakes model实现锐利多径的matlab代码
-
Grey Model ba
sed on Genetic 航空发电机状 - TS_fuzzy TS模糊
- 平均电流控制的boost pfc仿真(BoostPF
- 再入式飞行器轨道建模与仿真 (Mod
- wind_pmsg
- Mayr_arc_model_Extreme.slx
- Final_PMSM_model
- ARIMA ARIMA模型全称为差分自回归移动平
- matlab有源电力滤波器的仿真模型(A
- 采用着色模型的LBM两相流模拟 (LBM
- HEV-model-for-Cruise 混合动力汽车仿真模
-
HEV_Model_Simuli
nk 提供了混合动力电动 - paralell_model1 400Hz
- J-A-model-benchmark 基于JILES模型的磁滞回
- 卫星姿态控制模型 Satellite-attitude-co
- MMmpc 多模型预测控制
- Fuzzy-Synthetic-Evaluation-Model 在MATLAB下实
评论
共有 条评论