MathGroup Archive 2006

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

Search the Archive

question about Split[...]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64529] question about Split[...]
  • From: "Capet Arthur" <Arthur.Capet at student.ulg.ac.be>
  • Date: Mon, 20 Feb 2006 22:31:03 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

the question...

How can i restrict the maximum length of the sublist generated by the
function Split[list, test] ?


In details...

  i need to subdivise a given list into sublists consisting into a given
form (here it's p), repeated AT MAXIMUM k times, and then the
just-following  element in the initial list :

something like {p,... k times...,p, next})

i've found -- Split [ll, #1 == p &] -- useful but don't know how to limit 
the length of the generated sublists (to k+1)


 thanks a lot



Arthur Capet, ULG, Belgium


  • Prev by Date: Re: Statistical Analysis & Pattern Matching
  • Next by Date: Re: Greek-Letter Bug? Replacing Print
  • Previous by thread: Re: Re: Code to translate to negative base...
  • Next by thread: Re: question about Split[...]