energy consumption of siso hop (calculate data points)

Status
Not open for further replies.

hmayna

Newbie level 6
Joined
Sep 17, 2016
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
94
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
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…