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

Home » Public Forums » archive » histogram & reverse_indices
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: histogram & reverse_indices [message #30216 is a reply to message #30071] Tue, 09 April 2002 19:35 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Wayne Landsman <landsman@mpb.gsfc.nasa.gov> writes:

> Ken Mankoff wrote:
>
...
>> I want my algorithm to do the following: Return the index of all the
>> quadruplets that have at least 3 out of 4 numbers equal to each other
>> (i.e. for the above array, it should return [0,1,4]
>
> Here's a non-loop solution for the specific case, although it is a
> solution that is difficult to generalize, and which may be less
> understandable and slower than simply using a loop.

Ooof, Wayne beat me to the punch. It looks like a good technique.

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: basic soubt with fltarr
Next Topic: Ascertaining Keyword Parameters

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

Current Time: Wed Oct 08 12:55:11 PDT 2025

Total time taken to generate the page: 0.00374 seconds