hmayna
Newbie level 6
Hi all,
I have a source and destination separed by a distance d=100m;
I suppose that the energy consumption of this communication is a linear function of distance E=k*d;
matlab code
d=0:100;
k=3;
E=k.*d;
plot(d,E);
now I want to insert a node N every 25m, so,
I get source and destination separed by 3 node
Source------------node1-------------node2-----------node3------------------destination
25m
E1 E2 E3 E4
Ei=K.*d
total energy E=E1+E2+E3+E4;
How can I plotting E in function of d????
please help
I have a source and destination separed by a distance d=100m;
I suppose that the energy consumption of this communication is a linear function of distance E=k*d;
matlab code
d=0:100;
k=3;
E=k.*d;
plot(d,E);
now I want to insert a node N every 25m, so,
I get source and destination separed by 3 node
Source------------node1-------------node2-----------node3------------------destination
25m
E1 E2 E3 E4
Ei=K.*d
total energy E=E1+E2+E3+E4;
How can I plotting E in function of d????
please help