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 #48101] Tue, 28 March 2006 13:26 Go to previous message
mmeron is currently offline  mmeron
Messages: 44
Registered: October 2003
Member
In article <MPG.1e934acb64c3cce6989be0@news.frii.com>, David Fanning <davidf@dfanning.com> writes:
> 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
>
It sure is perfect for Histogram. For completeness, though, I've a
function (named SORPURGE) in my library that'll do the same, using a
single call to WHERE.

Mati Meron | "When you argue with a fool,
meron@cars.uchicago.edu | chances are he is doing just the same"
[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: Wed Oct 08 18:18:23 PDT 2025

Total time taken to generate the page: 0.00443 seconds