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.math.mathematica

Topic: very basic RecurrenceTable puzzle
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Alan

Posts: 95
Registered: 3/29/11
very basic RecurrenceTable puzzle
Posted: May 4, 2013 4:23 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

RecurrenceTable[{st[t] == If[t < 2, st[t - 1], 1], st[-1] == 0}, st, {t, -1, 5}]

produces

{0, st[-1], st[0], 1, 1, 1, 1}

I'm not seeing why the output contains st[-1] and st[0] instead of 0s.

Note that
RecurrenceTable[{st[t] == st[t - 1], st[-1] == 0}, st, {t, -1, 5}]
produces a list of zeros (i.e., no surprises).

Thanks,
Alan Isaac




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.