Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: total energy of sensor nodes
Replies: 5   Last Post: Aug 12, 2013 12:04 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 5,600
Registered: 2/7/05
Re: total energy of sensor nodes
Posted: Aug 10, 2013 9:31 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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).xd-sink.x)^2 + (S(j).yd-sink.y)^2);
> E=PL*(ETX+Efs.*(sqrt((S(j).xd-sink.x)^2 + (S(j).yd-sink.y)^2)))
> end
> Etotal=sum(E)
>


why is "distance" calculated but not used in the loop?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.