Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119929] Re: How to find the difference between two lists (opposite of union[]?)
  • From: "McHale, Paul" <Paul.McHale at excelitas.com>
  • Date: Thu, 30 Jun 2011 06:30:17 -0400 (EDT)

Thank you everyone for the many posts.  I know there had to be an easier way.  Went through the documentation but embarrassingly stepped right over it.

Thanks again,
Paul


Paul McHale  |  Electrical Engineer, Energetics Systems  |  Excelitas Technologies Corp.

Phone:   +1 937.865.3004   |   Fax:  +1 937.865.5170   |   Mobile:   +1 937.371.2828
1100 Vanguard Blvd, Miamisburg, Ohio 45342-0312 USA
Paul.McHale at Excelitas.com
www.excelitas.com



Please consider the environment before printing this e-mail.
This email message and any attachments are confidential and proprietary to Excelitas Technologies Corp. If you are not the intended recipient of this message, please inform the sender by replying to this email or sending a message to the sender and destroy the message and any attachments.
Thank you


-----Original Message-----
From: Bill Rowe [mailto:readnews at sbcglobal.net]
Sent: Wednesday, June 29, 2011 5:29 AM
To: mathgroup at smc.vnet.net
Subject: [mg119929] 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: End of Sound
  • Next by Date: Re: Improt vs Get
  • Previous by thread: Re: How to find the difference between two lists (opposite of union[]?)
  • Next by thread: Problem with Compile