Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13837 > unrolled thread
| Started by | Waclaw Kusnierczyk <waku@idi.ntnu.no> |
|---|---|
| First post | 2013-03-14 11:12 +0000 |
| Last post | 2013-03-14 11:12 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Noob requests help with recursive formula Waclaw Kusnierczyk <waku@idi.ntnu.no> - 2013-03-14 11:12 +0000
| From | Waclaw Kusnierczyk <waku@idi.ntnu.no> |
|---|---|
| Date | 2013-03-14 11:12 +0000 |
| Subject | Re: Noob requests help with recursive formula |
| Message-ID | <khsbb4$35v$1@smc.vnet.net> |
On 03/13/2013 09:19 AM, Garcia5529@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
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web