comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to Sort/Uniq a list and keep its original index
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to Sort/Uniq a list and keep its original index [message #50726 is a reply to message #50703] Wed, 11 October 2006 16:12 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dilkushi@gmail.com writes:

> I have to sort a file with 650,000 records in search of duplicate
> records.. and I need a list of duplicates (not a list without
> duplicates)...
> indexS=sort(testTotal)
> test=testTotal[indexS]
> indexU=uniq(test)
>
> indexU is an index with no duplicates..
> how do I get an index pertaining to the duplicates only?..

I haven't tested this, but just off the top of my
head:

I = Where(Histogram(indexU, Min=0, Max=N_Elements(testTotal)) $
EQ 0, count)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Weirdest Error Ever
Next Topic: Re: vector of bin indices using histogram?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:27:41 PDT 2025

Total time taken to generate the page: 0.00384 seconds