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

Home » Public Forums » archive » Re: WHERE approaching Flatland
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: WHERE approaching Flatland [message #34090 is a reply to message #34083] Tue, 18 February 2003 13:48 Go to previous messageGo to previous message
Wonko[3] is currently offline  Wonko[3]
Messages: 9
Registered: February 2003
Junior Member
sean@me.wustl.edu (Sean Raffuse) wrote:

> Is there are 2-d version of where?

> I would like to do this:

> bad = where(Array[*,*,0] GT Array[*,*,5])

> Array[bad,1:5] = Array[bad,0]

I do these things like this:

xy = (size(Array,/dim))[0] * (size(Array,/dim))[1]
for i = 1, 5 do Array[ bad + i*xy ] = Array[bad]

> I know that doesn't work, but after having spent some time with IDL,
> I'm allergic to loops.

Ummm... this should work:

n = n_elements( bad )
Array[ rebin(bad,n,5) + transpose(rebin((lindgen(5)+1)*xy,5,n)) ] =
rebin( array[bad], n, 5 )

Alex
--
Alex Schuster Wonko@wonkology.org PGP Key available
alex@pet.mpin-koeln.mpg.de
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: UNIQ without SORT
Next Topic: differences idl5.5 and idl5.6

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

Current Time: Wed Oct 08 17:51:13 PDT 2025

Total time taken to generate the page: 0.00460 seconds