MathGroup Archive 2010

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

Search the Archive

Re: sieving out selected multiples

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113827] Re: sieving out selected multiples
  • From: Raffy <adraffy at gmail.com>
  • Date: Sun, 14 Nov 2010 06:11:06 -0500 (EST)
  • References: <ibl9ev$b7c$1@smc.vnet.net>

On Nov 12, 9:58 pm, Andrea <and... at radargift.com> wrote:
> What is the simplest way to delete -- i.e., remove -- the multiples an
> integer from a list?
> And what is the simplest way to delete, simultaneously, the multiples from
> more than one selected integer from a list?
>
> I couldn't find a simple Mathematica function for this.
>
> Thanks,
> Andrea

list = {1,2,3,1,1,2,2,3,3}

For a individual selected case:  DeleteCases[list, 3]

For a multiple selected: DeleteCases[list, 1|2]

For all:  DeleteDuplicates[list]

For all + sort:  Union[list]

For all + count: Tally[list]


  • Prev by Date: Re: Table local
  • Next by Date: Re: Table local
  • Previous by thread: sieving out selected multiples
  • Next by thread: Re: sieving out selected multiples