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: [mg25410] Re: extracting elements from a list?
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Fri, 29 Sep 2000 01:07:01 -0400 (EDT)
  • References: <8qlon6$q8a@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Ryan,

Select[{v$2332Period, v$2334Period,
    v$1231MaxAccel}, (StringPosition[ToString[#], "Period"] =!= {} &)]

{v$2332Period, v$2334Period}

Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Ryan VanRiper" <ravanrip at yahoo.com> wrote in message
news:8qlon6$q8a at smc.vnet.net...
> 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}
>
> Thanks!
> Ryan
>
>
>
>




  • Prev by Date: Re: Nice graphs with Mathematica
  • Next by Date: Re: Point inside a plygon?
  • Previous by thread: Re: extracting elements from a list?
  • Next by thread: Linux/Unix add-ons