Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

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: [mg29092] RE: [mg28968] Q: Extract Elements from a List?
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.de>
  • Date: Tue, 29 May 2001 02:57:20 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Robert,

In[5]:= Take[list, {start, -1, step}]
Out[5]= {c, e, g, i}

-- Hartmut

> -----Original Message-----
> From: Robert Schuerhuber [mailto:robert.schuerhuber at gmx.at]
To: mathgroup at smc.vnet.net
> Sent: Wednesday, May 23, 2001 7:55 AM
> To: mathgroup at smc.vnet.net
> Subject: [mg29092] [mg28968] Q: Extract Elements from a List?
> 
> 
> 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: algebraic functions
  • Next by Date: Re: Forcing numbers to be real.
  • Previous by thread: RE: Q: Extract Elements from a List?
  • Next by thread: Re:mathematica eps plots and TeX