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: algebraic loop error
Replies: 6   Last Post: Dec 3, 2012 2:45 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Roger Stafford

Posts: 5,929
Registered: 12/7/04
Re: algebraic loop error
Posted: Nov 30, 2012 3:32 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"mado " <> wrote in message <k9ard0$l76$>...
> if Pn>Pm
> Ip = Ipold+K1 *e
> end
> Ip = Ipold+K2 *e

- - - - - - - - - -
There is something amiss in your code. The 'if-end' result is totally ignored:

if Pn>Pm
Ip = Ipold+K1 *e
Ip = Ipold+K2 *e

Regardless of whether Pn is greater than Pm or not, the result is always the same. The line "Ip = Ipold+K2*e" overwrites whatever change was made to 'Ip' in the 'if' construct. I am sure you meant something else.

Roger Stafford

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.