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 #48106 is a reply to message #48105] Tue, 28 March 2006 12:30 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jonathan Wolfe writes:

> 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!

Removing elements from an array is tailor-made for
the HISTOGRAM function. See the Histogram Tutorial for
an example:

http://www.dfanning.com/tips/histogram_tutorial.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[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: Fri Oct 10 11:13:09 PDT 2025

Total time taken to generate the page: 1.68591 seconds