Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*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 2000

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

Search the Archive

Re: extracting elements from a list?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25386] Re: [mg25379] extracting elements from a list?
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Fri, 29 Sep 2000 01:06:17 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Here is one way:

In[5]:=
Select[{v$2332Period, v$2334Period, v$1231MaxAccel},
  StringMatchQ[ToString[#], "*Period*"] &]

Out[5]=
{v$2332Period, v$2334Period}

on 00.9.25 5:29 AM, Ryan VanRiper at 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}
> 
> Thanks!
> Ryan
> 
> 
> 
> 

-- 
Andrzej Kozlowski
Toyama International University
JAPAN

http://platon.c.u-tokyo.ac.jp/andrzej/
http://sigma.tuins.ac.jp/



  • Prev by Date: StringQ?
  • Next by Date: Re: Integrate[[1/(1+x+x^5),{x,-Infinity,Infinity}]
  • Previous by thread: Re: extracting elements from a list?
  • Next by thread: Re: extracting elements from a list?