MathGroup Archive 2010

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

Search the Archive

Re: sieving out selected multiples


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