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 » Inactive » comp.soft-sys.math.mathematica

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

Topic: very basic RecurrenceTable puzzle
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

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}]


{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).

Alan Isaac

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.