MathGroup Archive 2007

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

Search the Archive

Re: On partitioning lists by intervals


Hi,

if you need a fixed length of the sub lists
lst=Table[Random[],{100}];

Partition[Sort[lst],10]

will help. But this is different from
"I need to get sublists of values that go from 0 to
 > 10, 10 to 20, etc"

BinCounts[lst,{0,1,0.1}]

Regards
   Jens

Mauricio Esteban Cuak wrote:
> Hello there.
> I'm just starting in mathematica and I realise this is a very basic
> question, but I tried to find an answer on the documentation center
> for a couple of hours and on the archive for mathgroup, but couldn't
> find it.
> I have a list of say 500 different random values. I need to divide it
> in n intervals of fixed length (for example, the lowest value is 0 and
> the maximum 100 so I need to get sublists of values that go from 0 to
> 10, 10 to 20, etc.)
> Thanks for your help!
> 
> cd
> 


  • Prev by Date: Re: On partitioning lists by intervals
  • Next by Date: Re: Any way to exclude branch-cut fills in this plot?
  • Previous by thread: Re: On partitioning lists by intervals
  • Next by thread: Re: On partitioning lists by intervals