资源简介
网络数据包丢失模型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译码算法
相关资源
- BL_model.rar
- Model Predictive Control
- Business Model Generation商业模式新生代
- Model Predictive Control System Design using M
- Model Predictive Control System Design and Imp
- Modelling.the.Wireless.Propagation.Channel.A.s
- MATLAB设计FPGA实现联合ISE和Modelsim仿真
- Random Walk Model Matlab源代码
- Robotics Modelling Planning and Control
- wind turbine model
- Practical Finite ElementModeling in Earth Scie
- dace.rar+Kriging+surrogate model
- Model+Predictive Control System Design and Imp
- Dirichlet Process Mixture Models(DPMM)
- ModelPredictiveControlSystemDesignandImplement
- Multiphysics Modeling Using COMSOL5 and MATLAB书
- model facenet模型
- 机器人学导论课后答案及参考书籍R
- LeslieModel.zip
- GAC model code
- 质子交换膜燃料电池建模与MATLAB仿真
- 时间序列的分析——模型的识别与预
-
MATLABSimuli
nk与Modelsim联合仿真步骤及 -
matlab simuli
nk 逆变器并网model VF/PQ控 - Matlab SIS model code
- 光伏电池组 局部阴影时输出模型 P-
- matlab混合高斯背景建模
- KaYaModel.mta
- Elhorst_files_matlab_spatial_modeling.zip
-
三相逆变器simuli
nk仿真模型
评论
共有 条评论