MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Noob requests help with recursive formula

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130143] Re: Noob requests help with recursive formula
  • From: Waclaw Kusnierczyk <waku at idi.ntnu.no>
  • Date: Thu, 14 Mar 2013 07:13:09 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20130313081908.8485769BB@smc.vnet.net>

On 03/13/2013 09:19 AM, Garcia5529 at yahoo.fr 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}}]

vQ



  • Prev by Date: Re: Query regarding Function
  • Next by Date: Front end text formatting - fraction font size and text in tables
  • Previous by thread: Noob requests help with recursive formula
  • Next by thread: Re: Noob requests help with recursive formula