MathGroup Archive 2000

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

Search the Archive

Re: extracting elements from a list?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25384] Re: [mg25379] extracting elements from a list?
  • From: "Rosa Ma. Seco" <ceie at prodigy.net.mx>
  • Date: Fri, 29 Sep 2000 01:06:15 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I hope you won't find this too cryptic:

In[1]:=
 a = {v$2332Period, v$2334Period, v$1231MaxAccel};

In[2]:=
newlist =
Extract[a,Position[StringTake[#,-6]=="Period"&/@(ToString/@a),True]]
Out[2]=
{v$2332Period,v$2334Period}

Tomas Garza
Mexico City

Ryan VanRiper [mailto:ravanrip at yahoo.com] wrote:

> Hi,  I have a question about extracting particular elements in a list.
>
> If i have the list {v$2332Period, v$2334Period, v$1231MaxAccel}
>
> How would i go about searching through this list and returning a new
> list that has only elements with the word "Period" in them.
>
> So the answer im looking for using the above list would be:
>
> newlist = {v$2332Period, v$2334Period}



  • Prev by Date: Re: extracting elements from a list?
  • Next by Date: Re: extracting elements from a list?
  • Previous by thread: Re: extracting elements from a list?
  • Next by thread: Re: extracting elements from a list?