MathGroup Archive 2003

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

Search the Archive

Re: DeleteCases

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42248] Re: [mg42224] DeleteCases
  • From: Kirk Reinholtz <kirk.reinholtz at jpl.nasa.gov>
  • Date: Wed, 25 Jun 2003 01:53:43 -0400 (EDT)
  • References: <200306240527.BAA22169@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

list3 = Complement[list1,Intersection[list1,list2]]

Shawn Kelly wrote:
> 
> I have twos lists I want to compare with one another and delete the cases
> where the elements in list1 match list2.  For example:
> 
> list1={21,41,61,71,81}
> list2={71,73,75,77,79,81}
> 
> I want the new list3 to read:
> list3={21,41,61}
> 
> It seems to me that the following should work:
> list3=DeleteCases[list1,list2]
> 
> Any thoughts?
> 
> Thanks
> 
> Shawn


  • References:
  • Prev by Date: NDSolve documentation
  • Next by Date: Re: DeleteCases
  • Previous by thread: DeleteCases
  • Next by thread: RE: DeleteCases