MathGroup Archive 2007

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

Search the Archive

Re: Deleting duplicates from a list


Raul Martinez wrote:
> Hi all,
> 
> I have a list, e.g., {8, 8, 11, 11, 19}. I want to eliminate all  
> duplicates so the list becomes {8, 11, 19}. Can anyone suggest a  
> command that will do this?
> 
> TIA,
> 
> Raul Martinez
> 

Union is what you are looking for.

Union[{8, 8, 11, 11, 19}]

==> {8, 11, 19}

Regards,
Jean-Marc


  • Prev by Date: Re: Solve & RotationMatrix
  • Next by Date: About UnitStep and ZeroValue
  • Previous by thread: Re: Deleting duplicates from a list
  • Next by thread: Re: Deleting duplicates from a list