MathGroup Archive 2011

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

Search the Archive

Re: How to find the difference between two lists (opposite of union[]?)


On 6/28/11 at 7:55 AM, Paul.McHale at excelitas.com (McHale, Paul)
wrote:

>I want to generate 1000 random integers between 1 and 1000.  Then
>find out what numbers between 1 and 1000 were not generated.

generatedNumbers=RandomInteger[{1,1000},{1000}];
missingNumbers = Complement[Range[1000],generatedNumbers];



  • Prev by Date: Re: C code generation
  • Next by Date: Bug in Sum?
  • Previous by thread: Re: How to find the difference between two lists (opposite of union[]?)
  • Next by thread: Re: How to find the difference between two lists (opposite of union[]?)