标题:
我的leach协议改进与仿真 含MATLAB源程序
[打印本页]
作者:
mww321
时间:
2019-7-6 21:04
标题:
我的leach协议改进与仿真 含MATLAB源程序
这是我最近写的一篇文档中涉及到的leach路由协议的改进算法及其仿真
用了一个星期时间
含源代码和
希望大家多多指教
0.png
(5.26 KB, 下载次数: 46)
下载附件
2019-7-7 02:48 上传
MATLAB源程序如下:
clear all;clc;close all;
LEACH;
LEACH_opt;
load res1
figure(5);clf;hold on
plot(1:rnd,op(1:rnd),'--k','Linewidth',1);
xlabel '轮数/r';
ylabel '存活节点个数';
hold on;
figure(7);clf;hold on
plot(1:rnd,op(1)-op(1:rnd),'--k','Linewidth',1);
xlabel '轮数/r';
ylabel '死亡节点个数';
hold on;
figure(6);clf;hold on
plot(1:rnd,EnrRes(1:rnd),'--k','Linewidth',1);
xlabel '轮数/r';
ylabel '节点剩余能量平均值';
hold on;
load res2
figure(5)
plot(1:rnd+1,[op(1:rnd) 0],'-k','Linewidth',1);
axis([0 2e4 0 op(1)])
legend('改进前','改进后');
figure(6)
plot(1:rnd,EnrRes(1:rnd),'-k','Linewidth',1);
legend('改进前','改进后');
figure(7);
plot(1:rnd+1,op(1)-[op(1:rnd) 0],'-k','Linewidth',1);
axis([0 2e4 0 op(1)])
legend('改进前','改进后');
复制代码
所有资料51hei提供下载:
Code2.zip
(588.4 KB, 下载次数: 42)
2019-7-6 21:03 上传
点击文件名下载附件
下载积分: 黑币 -5
作者:
974289358
时间:
2020-4-14 17:31
您好大神,在么,我下载了您这个代码,对我非常有帮助,但是看不明白,希望能跟您加一下q好友,可以向您询问一下这个代码相关的东西
作者:
用心小菜鸟
时间:
2020-5-16 14:28
L楼主能讲讲他的原理嘛
作者:
996479901@
时间:
2022-3-12 19:01
楼主这个代码改进的方向是哪个方面的啊
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1