Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

RE: List Manipulation



If your list of lists is call Mlist, you can get the new list with just
the odd ones by doing:

In[1]:= MList = {1,2,3,4,5,6,7,8};
          First /@ Partition[ MList,2]

Out[1]= {1,3,5,7}

good luck!

Luc Barthelet


>-----Original Message-----
>From:	Paul.Hanson@colorado.edu [SMTP:Paul.Hanson@colorado.edu]
To: mathgroup@smc.vnet.net
>Sent:	Friday, January 16, 1998 1:35 AM
>To:	mathgroup@smc.vnet.net
>Subject:	[mg10471] List Manipulation
>
>Hola!
>  Hope you're all doing well.  If I have a list of n lists, and want to
>get rid of all the even ones how would I go about doing  this?  That
>is, {{n1},{n2},.....{2n}} converted to {{n1},{n3}...{2n-1}}. I tried
>using the various procedures in Wolfram's book, but nothing seems to
>work (ie, Delete, Take, etc.).  Thanks for the help.
>
>Paul Hanson
>
>-- 
>				 * * 
>                                *    *
>                           /\    */\*
>                          /  \   /  \ /\
>



  • Prev by Date: [Q]Mathematica: Alternative to GrayLevel for photocopies?
  • Next by Date: Re: ReplacePart?
  • Prev by thread: Re: List Manipulation
  • Next by thread: Re: List Manipulation