MathGroup Archive 2010

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

Search the Archive

Re: Occurrences in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106387] Re: Occurrences in Mathematica
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Mon, 11 Jan 2010 05:30:46 -0500 (EST)
  • References: <hic33o$59f$1@smc.vnet.net>

Hi,
> 
> I have a very big list of elements and I need Mathematica to give me
> only those elements which occure only once...
> 
> Could anybody advise me please how to write the code for that?
> 
If you use version 6 or 7, maybe like this?

list = RandomInteger[1000, 1000];

Cases[Tally[list], {x_, 1} :> x]

hth,

albert


  • Prev by Date: Re: Occurrences in Mathematica
  • Next by Date: Rotate
  • Previous by thread: Re: Occurrences in Mathematica
  • Next by thread: Re: Occurrences in Mathematica