The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 6,677
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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.