MathGroup Archive 2001

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

Search the Archive

Re: Q: Extract Elements from a List?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29001] Re: Q: Extract Elements from a List?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 24 May 2001 04:07:23 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <9efk6g$1d8@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

First /@ Partition[Drop[list, start - 1], step]

??

Regards
  Jens

Robert Schuerhuber wrote:
> 
> hi!
> 
> probably a very easy question, but i couldn't find an answer in the
> mathematica-book:
> 
> i need to extract elements from a list, starting th element number x and
> than taking every yth element, eg:
> 
> with
> 
> list={a,b,c,d,e,f,g,h,i,j}
> start=3;
> step=2:
> 
> i'd like to get the list
> 
> {c,e,g,i}.
> 
> how can i do this in the easiest way?
> 
> regards, robert


  • Prev by Date: Congruences
  • Next by Date: Returning List Position w/o brackets
  • Previous by thread: Re: Q: Extract Elements from a List?
  • Next by thread: Re: Q: Extract Elements from a List?