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

Home » Public Forums » archive » Re: Removing repeating array values
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: Removing repeating array values [message #48105 is a reply to message #48104] Tue, 28 March 2006 12:40 Go to previous messageGo to previous message
mchinand is currently offline  mchinand
Messages: 66
Registered: September 1996
Member
In article <1143577351.464281.41560@i39g2000cwa.googlegroups.com>,
Jonathan Wolfe <vorticitywolfe@gmail.com> wrote:
> Is there an easier way than a for loop to remove repeating values
> within an array? For example, I have two arrays and am trying to match
> the closest value from one with the other using a where() statement.
> When the where statement is returned, I have multiple instances of the
> same value; however, I just want to keep one of these. A for loop
> works, but computing speed is slow, I'm running on an old 700MHz PIII.
> Do you know of a faster way? Thanks for the help!
>
> Jon

See the UNIQ function. Your array has to be sorted or else you need to use the optional
index parameter.

--Mike


--
Michael Chinander, PhD
m-chinander@uchicago.edu
Department of Radiology
University of Chicago
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Removing repeating array values
Next Topic: Re: problem using p.multi in IDL 5.3/IRIX

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

Current Time: Thu Oct 09 14:54:32 PDT 2025

Total time taken to generate the page: 1.51843 seconds