MathGroup Archive 2007

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

Search the Archive

Re: Selecting Sub-lists After Split


On 8 Giu, 11:42, Gregory Lypny <gregory.ly... at videotron.ca> wrote:
> Hello everyone,
>
> Suppose I have a list of real number called myList.  I split it into
> sub-lists of positive and negative numbers called myNewList by doing
> this (there may be a more elegant way):
>
> myNewList = Split[myList, #1 #2 > 0 &]
>
> Now, how can I select all of the sub-lists of negative numbers from
> myNewList?
>
> Any tips would be most appreciated.
>
> Regards,
>
>         Gregory

Select[myNewList, First[#] < 0 &]

Adriano Pascoletti



  • Prev by Date: NIntegrate with change of variables
  • Next by Date: Re: Selecting Sub-lists After Split
  • Previous by thread: Re: Selecting Sub-lists After Split
  • Next by thread: Re: Selecting Sub-lists After Split