Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: total energy of sensor nodes
Posted:
Aug 10, 2013 9:31 AM


On 8/10/2013 5:03 AM, Philip wrote: > please the last E generated is showing as the total, i want to > find the sum of E generated (i.e 1 to 10). > for j=1:1:10 > distance=sqrt((S(j).xdsink.x)^2 + (S(j).ydsink.y)^2); > E=PL*(ETX+Efs.*(sqrt((S(j).xdsink.x)^2 + (S(j).ydsink.y)^2))) > end > Etotal=sum(E) >
why is "distance" calculated but not used in the loop?



