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: Noob requests help with recursive formula
Replies: 2   Last Post: Mar 14, 2013 7:12 AM

Advanced Search

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

Posts: 14
Registered: 1/27/11
Re: Noob requests help with recursive formula
Posted: Mar 14, 2013 7:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 03/13/2013 09:19 AM, wrote:
> I appreciate any tips on how to code this in Mathematica.
> I have two lists, each with 99 elements; A and B. Real numbers.
> I want to form a list, C, whose elements are functions (F[]) of A and B, and also previous elements of C itself.
> C ={F[A1/B1], F[A2/(B2-A1/C1)], F[A3/(B3-A1/C1-A2/C2)],..F[A99/(B99-A1/C1...-A98/C98.)}
> ...where the integers after A,B, and C, are element indices.
> Thanks for any suggestions.
> HG

As far as I understand your request, here is one, not necessarily
optimal way of solving your problem:

whatever[as_,bs_,cs_] :=
MapThread[f[#1/(#2-#3)]&, {as, bs, Prepend[Most@Accumulate[as/cs], 0]}]

Tested on dummy data:

whatever @@ Table[Table[Subscript[v, i], {i, 99}], {v, {a, b, c}}]


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.