MathGroup Archive 2007

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

Search the Archive

Re: neat way to program minimum of sum


On 18 Kwi, 11:09, Norbert Marxer <mar... at mec.li> wrote:

> f[t_] := Length@NestWhileList[(
>       s = s + Random []) &, s = Random[], (s < t) &] - 1

This is nice but not satisfactory. The statement is that I have the
values x[1], x[2], ... given first and then based on these I want to
generate the minimum (should be minimum there, not maximum). I think
that the code you suggested will give different answer every time...
If I'm wrong please correct me.

P. Kaminski



  • Prev by Date: Re: Eliminate white border around DensityPlot?
  • Next by Date: ContourPlot3D Problem
  • Previous by thread: Re: neat way to program minimum of sum
  • Next by thread: Re: neat way to program minimum of sum