Many Lists
- To: mathgroup at smc.vnet.net
- Subject: [mg31028] Many Lists
- From: Yasvir Avindra Tesiram <y.tesiram at pgrad.unimelb.edu.au>
- Date: Fri, 5 Oct 2001 01:22:37 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
G'day Mathgroup, Quick question, I have three lists x={1,2,3} y={5,6,7} z={8,9,10}. How do I go about operating on the lists in parallel to give me a cumulative value of f. As an example, for the general function defined by f=x*a0 + y*b0 + z*b0, with initial conditions a0=0; b0=0; c0=1; x=1; y=5; z=8; so f(1) = z f(2) = f(1) + 2*f(1) + 6*f(1) + 9*f(1) f(3) = f(1) + f(2) + 3*(f2) + 7*(f2) + 10*f(2). I understand that the above can be done by FoldList, but how do I slot in different numbers from three different lists at the same time. Thanks Yas