MathGroup Archive 2001

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

Search the Archive

Re: Q: DeleteCases

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27911] Re: Q: DeleteCases
  • From: drnews at NOSPAM--Scientificarts.com (David Reiss)
  • Date: Fri, 23 Mar 2001 04:31:37 -0500 (EST)
  • Organization: Scientific Arts
  • References: <99chk4$8bn@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <99chk4$8bn at smc.vnet.net>, Robert Schuerhuber
<robert.schuerhuber at gmx.at> wrote:

> hi!
> i've a rather simple question with the deletecases, but unfortunately i
> couldn't find a clue in the mathematica-help (again ..):
> 
> i want to to use DeleteCases to remove number of lists, which are
> greater than a given limit, eg.
> 
> t={1,2,3,4}
> DeleteCases[t, ????]
> 
> should remove all entries greater than 2, therefore
> 
> t={1,2}
> 
> which pattern do i have to use?
> 
> regards, robert


In[1]:=
t={1,2,3,4};
DeleteCases[t,_?(#>2&)]


Out[2]=
{1,2}

--David

-- 
) Scientific Arts: http://www.scientificarts.com     
) Creative Services and Consultation for the Applied                            
) and Pure Sciences:: David Reiss: dreiss at !SPAMscientificarts.com
) [Remove the !SPAM to send email]


  • Prev by Date: Re: DeleteCases
  • Next by Date: Re: Random number generation
  • Previous by thread: RE: Q: DeleteCases
  • Next by thread: Re: Q: DeleteCases