Re: Complicated Rotation
- To: mathgroup at smc.vnet.net
- Subject: [mg27257] Re: [mg27237] Complicated Rotation
- From: Matthias Hertel <wir95cgu at studserv.uni-leipzig.de>
- Date: Wed, 14 Feb 2001 03:41:25 -0500 (EST)
- References: <200102130835.DAA06532@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Yas <yast at optushome.com.au> writes: > So at t = 0, sf = s0. > > And at successive increments of time > > sf[1] = r[1]*s0 > sf[2] = r[2]*sf[1] > sf[3] = r[3]*sf[2] > | > | > sf[n] = r[n]*sf[n-1] > > Unfortunately I am not much of a programmer and I have had various attempts > with Map and Do and Table constructs with various errors. Could someone > please explain a method whereby I could get a list of sf values so that I > can plot sf versus time. What about FoldList[r[#2].#1 &, s0, Range[n]] For n=5 this gives {s0, r[1].s0, r[2].r[1].s0, r[3].r[2].r[1].s0, r[4].r[3].r[2].r[1].s0, r[5].r[4].r[3].r[2].r[1].s0} and if I understood you correctly, this is exactly what you wanted. (If r[t_] and s0 are actually defined in you Mathematica session, these expressions will of course be evaluated.) You can then give this list to ListPlot and you're done. Matthias
- References:
- Complicated Rotation
- From: Yas <yast@optushome.com.au>
- Complicated Rotation