Re: Run in Mathematica, please?
- From: jdolan@xxxxxxxxxxxxxxxxxxxxxxxx (James Dolan)
- Date: Wed, 31 May 2006 00:29:26 +0000 (UTC)
in article <aw4fg.20$1y1.2@xxxxxxxx>,
stephen j. herschkorn <sjherschko@xxxxxxxxxxxx> wrote:
|Could someone please run the following in Mathematica and give me the
|outcome? I lost access to a version years ago. TIA
|
|f[0,_,_]:= 1
|f[1, c_, t_]:= f[1,c,t] = Apply[Plus, c] / t
|f[k_, c_, t_]:= f[k, c, t] = Sum[c[[i]] f[k-1, Drop[c,{i,i}], t-c[[i]]],
|{i, Length[c]}] / t
|Table[p[k] = f[k, {55,55,88,88,125,125}, 1320], {k,0,6}]; p[7]=0;
|MatrixForm[Table[{k, N[p[k]-p[k+1]]}, {k,0,6}]]
0 0.593939393939394
1 0.26075049200390293
2 0.10127535554923131
3 0.03343421217884559
4 0.00879817844040312
5 0.0016399331389532524
6 0.00016243474926982637
in the actual mathematica display somewhat fewer digits were actually
displayed, for some reason.
--
jdolan@xxxxxxxxxxxx
.
- Follow-Ups:
- Re: Run in Mathematica, please?
- From: Dave (from the UK)
- Re: Run in Mathematica, please?
- References:
- Run in Mathematica, please?
- From: Stephen J. Herschkorn
- Run in Mathematica, please?
- Prev by Date: inverse fourier transform
- Next by Date: Re: JSH: Learning consensus
- Previous by thread: Run in Mathematica, please?
- Next by thread: Re: Run in Mathematica, please?
- Index(es):
Relevant Pages
|